Coly Li
437de04184
bcache: fix input overflow to writeback_rate_minimum
...
[ Upstream commit dab71b2db98dcdd4657d151b01a7be88ce10f9d1 ]
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 >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2019-11-06 13:05:20 +01:00
..
2019-11-06 13:05:20 +01:00
2019-08-29 08:28:56 +02:00
2018-06-08 11:53:14 -04:00
2018-06-08 11:53:14 -04:00
2019-08-29 08:28:49 +02:00
2018-04-30 15:40:40 -04:00
2019-05-25 18:23:38 +02:00
2018-06-12 16:19:22 -07:00
2019-10-29 09:20:03 +01:00
2019-08-25 10:48:01 +02:00
2019-09-16 08:22:14 +02:00
2019-05-25 18:23:39 +02:00
2019-01-26 09:32:42 +01:00
2019-08-29 08:28:55 +02:00
2018-06-05 08:47:43 -06:00
2018-11-13 11:08:49 -08:00
2019-08-29 08:28:55 +02:00
2019-01-26 09:32:42 +01:00
2018-05-30 15:33:32 -06:00
2019-07-03 13:14:45 +02:00
2019-09-16 08:22:12 +02:00
2019-01-26 09:32:42 +01:00
2019-08-29 08:28:55 +02:00
2018-06-12 18:28:00 -07:00
2019-10-05 13:10:03 +02:00
2019-11-06 13:05:11 +01:00
2018-06-12 16:19:22 -07:00
2018-05-22 23:18:31 -07:00
2018-06-12 16:19:22 -07:00
2019-08-29 08:28:56 +02:00
2019-09-16 08:22:12 +02:00
2019-09-16 08:22:21 +02:00
2019-01-31 08:14:38 +01:00
2019-04-05 22:32:59 +02:00
2019-01-26 09:32:42 +01:00
2018-06-05 10:48:05 -07:00
2018-05-30 15:33:32 -06:00
2019-07-21 09:03:08 +02:00
2018-08-25 18:13:10 -07:00
2019-08-29 08:28:59 +02:00
2019-08-29 08:28:56 +02:00
2019-10-01 08:26:10 +02:00
2019-08-29 08:28:56 +02:00
2019-08-25 10:48:01 +02:00
2018-06-08 11:59:51 -04:00
2018-06-08 11:59:51 -04:00
2018-08-18 16:48:07 -07:00
2018-08-01 15:49:39 -07:00
2018-08-31 17:38:10 -07:00
2018-05-30 15:33:32 -06:00
2018-05-30 15:33:32 -06:00
2018-06-12 16:19:22 -07:00
2018-05-30 15:33:32 -06:00
2019-10-05 13:10:10 +02:00
2019-10-05 13:10:10 +02:00
2019-10-29 09:19:37 +01:00
2019-10-05 13:10:12 +02:00
2019-10-05 13:09:54 +02:00
2018-05-30 15:33:32 -06:00
2019-02-06 17:30:16 +01:00
2018-08-31 17:38:09 -07:00
2018-05-30 15:33:32 -06:00
2019-10-05 13:10:10 +02:00
2018-06-09 12:01:36 -07:00
2019-03-23 20:10:11 +01:00
2018-05-30 15:33:32 -06:00