diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2010-10-26 17:21:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:04 -0400 |
| commit | 52c5171214ff3327961d0ce0db7e8d2ce55004fd (patch) | |
| tree | 705e7f51b39f4e8af767cc2a8df19e9e78f15000 /include/linux | |
| parent | 1b627d5771312c92404b66f0a0b16f66036dd2e1 (diff) | |
kfifo: disable __kfifo_must_check_helper()
This helper is wrong: it coerces signed values into unsigned ones, so code
such as
if (kfifo_alloc(...) < 0) {
error
}
will fail to detect the error.
So let's disable __kfifo_must_check_helper() for 2.6.36.
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kfifo.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 62dbee554f60..c238ad2f82ea 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -171,11 +171,8 @@ struct kfifo_rec_ptr_2 __STRUCT_KFIFO_PTR(unsigned char, 2, void); | |||
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | 173 | ||
| 174 | static inline unsigned int __must_check | 174 | /* __kfifo_must_check_helper() is temporarily disabled because it was faulty */ |
| 175 | __kfifo_must_check_helper(unsigned int val) | 175 | #define __kfifo_must_check_helper(x) (x) |
| 176 | { | ||
| 177 | return val; | ||
| 178 | } | ||
| 179 | 176 | ||
| 180 | /** | 177 | /** |
| 181 | * kfifo_initialized - Check if the fifo is initialized | 178 | * kfifo_initialized - Check if the fifo is initialized |
