lkml.org 
[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[099/289] kfifo: disable __kfifo_must_check_helper()
    2.6.36-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Andrew Morton <akpm@linux-foundation.org>

    commit 52c5171214ff3327961d0ce0db7e8d2ce55004fd upstream.

    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>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    include/linux/kfifo.h | 7 ++-----
    1 file changed, 2 insertions(+), 5 deletions(-)

    --- a/include/linux/kfifo.h
    +++ b/include/linux/kfifo.h
    @@ -171,11 +171,8 @@ struct kfifo_rec_ptr_2 __STRUCT_KFIFO_PT
    }


    -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



    \
     
     \ /
      Last update: 2010-12-08 02:45    [W:0.018 / U:32.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site