projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b627d5
)
kfifo: disable __kfifo_must_check_helper()
author
Andrew Morton
<
[email protected]
>
Tue, 26 Oct 2010 21:21:19 +0000
(14:21 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Oct 2010 23:52:04 +0000
(16:52 -0700)
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 <
[email protected]
>
Cc: Stefani Seibold <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
include/linux/kfifo.h
patch
|
blob
|
history
diff --git
a/include/linux/kfifo.h
b/include/linux/kfifo.h
index 62dbee554f608c91fe7b2b3bf01f390260821c52..c238ad2f82eae4f149e70fc7138fdd5beaa40b13 100644
(file)
--- 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);
}
-static inline unsigned int __must_check
-__kfifo_must_check_helper(unsigned int val)
-{
- return val;
-}
+/* __kfifo_must_check_helper() is temporarily disabled because it was faulty */
+#define __kfifo_must_check_helper(x) (x)
/**
* kfifo_initialized - Check if the fifo is initialized