summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2019-02-09 12:53:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 09:33:51 +0200
commitd775179e00cdc6fed4c33fef92dcfb24a797e39e (patch)
tree943abc660f7f66b78e0d6390dee7a7afc92bd0c7 /drivers/tty/tty_buffer.c
parentb25147b49301454409d9e38b0cbd46221be089a8 (diff)
bcache: fix input overflow to cache set sysfs file io_error_halflife
[ Upstream commit a91fbda49f746119828f7e8ad0f0aa2ab0578f65 ] Cache set sysfs entry io_error_halflife is used to set c->error_decay. c->error_decay is in type unsigned int, and it is converted by strtoul_or_return(), therefore overflow to c->error_decay is possible for a large input value. This patch fixes the overflow by using strtoul_safe_clamp() to convert input string to an unsigned long value in range [0, UINT_MAX], then divides by 88 and set it to c->error_decay. Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
0 files changed, 0 insertions, 0 deletions