• D
    block: reject invalid queue attribute values · b1f3b64d
    Dave Reisner 提交于
    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: NDave Reisner <dreisner@archlinux.org>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    b1f3b64d
blk-sysfs.c 15.0 KB