• Dave Reisner's avatar
    block: reject invalid queue attribute values · b1f3b64d
    Dave Reisner authored
    Instead of using simple_strtoul which "converts" invalid numbers to 0,
    use strict_strtoul and perform error checking to ensure that userspace
    passes us a valid unsigned long. This addresses problems with functions
    such as writev, which might want to write a trailing newline -- the
    newline should rightfully be rejected, but the value preceeding it
    should be preserved.
    
    Fixes BZ#46981.
    Signed-off-by: default avatarDave Reisner <dreisner@archlinux.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    b1f3b64d
blk-sysfs.c 15 KB