Skip to content
Commit b1f3b64d authored by Dave Reisner's avatar Dave Reisner Committed by Jens Axboe
Browse files

block: reject invalid queue attribute values



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>
parent bf800ef1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment