summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2019-02-09 12:53:07 +0800
committerJens Axboe <axboe@kernel.dk>2019-02-09 07:18:32 -0700
commitdab71b2db98dcdd4657d151b01a7be88ce10f9d1 (patch)
treea396e301c99ef2770c9725493a86f4257bef9f52 /include
parent5b5fd3c94eef69dcfaa8648198e54c92e5687d6d (diff)
downloadlinux-stable-dab71b2db98dcdd4657d151b01a7be88ce10f9d1.tar.gz
linux-stable-dab71b2db98dcdd4657d151b01a7be88ce10f9d1.tar.bz2
linux-stable-dab71b2db98dcdd4657d151b01a7be88ce10f9d1.zip
bcache: fix input overflow to writeback_rate_minimum
dc->writeback_rate_minimum is type unsigned integer variable, it is set via sysfs interface, and converte from input string to unsigned integer by d_strtoul_nonzero(). When the converted input value is larger than UINT_MAX, overflow to unsigned integer happens. This patch fixes the overflow by using sysfs_strotoul_clamp() to convert input string and limit the value in range [1, UINT_MAX], then the overflow can be avoided. Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions