Mikulas Patocka
07eae146f5
block: fix infinite loop if the device loses discard capability
...
[ Upstream commit b88aef36b87c9787a4db724923ec4f57dfd513f3 ]
If __blkdev_issue_discard is in progress and a device mapper device is
reloaded with a table that doesn't support discard,
q->limits.max_discard_sectors is set to zero. This results in infinite
loop in __blkdev_issue_discard.
This patch checks if max_discard_sectors is zero and aborts with
-EOPNOTSUPP.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Zdenek Kabelac <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-29 13:39:07 +01:00
..
2018-09-19 22:43:44 +02:00
2017-12-20 10:10:26 +01:00
2018-09-19 22:43:35 +02:00
2018-08-17 21:01:11 +02:00
2017-09-07 11:59:42 -07:00
2018-11-13 11:14:55 -08:00
2017-09-07 11:59:42 -07:00
2018-09-15 09:45:30 +02:00
2018-06-21 04:02:44 +09:00
2018-11-21 09:24:09 +01:00
2017-06-09 09:27:32 -06:00
2017-08-25 10:36:54 -06:00
2017-06-09 09:27:32 -06:00
2017-11-02 11:10:55 +01:00
2018-12-29 13:39:07 +01:00
2018-02-25 11:07:49 +01:00
2018-04-26 11:02:15 +02:00
2018-04-19 08:56:20 +02:00
2018-04-26 11:02:11 +02:00
2017-11-02 11:10:55 +01:00
2017-08-18 08:08:14 -06:00
2017-08-08 14:58:03 -04:00
2018-09-26 08:38:13 +02:00
2017-11-02 11:10:55 +01:00
2017-05-04 08:24:13 -06:00
2018-09-19 22:43:39 +02:00
2017-11-02 11:10:55 +01:00
2017-02-27 20:54:05 +02:00
2018-10-13 09:27:22 +02:00
2018-06-21 04:02:49 +09:00
2018-09-26 08:38:00 +02:00
2017-11-02 11:10:55 +01:00
2017-05-10 07:40:18 -06:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-29 17:53:47 +01:00
2017-11-30 08:40:52 +00:00
2018-02-22 15:42:29 +01:00
2017-11-02 11:10:55 +01:00
2018-06-16 09:45:14 +02:00
2018-03-03 10:24:35 +01:00
2018-01-02 20:31:05 +01:00
2017-10-04 08:35:04 -06:00
2017-08-29 10:50:30 -06:00
2018-09-15 09:45:31 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-28 10:01:08 -06:00
2018-12-21 14:13:10 +01:00
2018-06-21 04:02:49 +09:00
2017-04-08 11:25:38 -06:00
2017-06-21 11:46:07 -06:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-08 22:41:05 -08:00
2017-11-02 11:10:55 +01:00
2017-08-29 10:47:23 -06:00
2017-01-17 10:03:33 -07:00
2017-09-11 09:45:52 -06:00
2018-06-21 04:02:49 +09:00
2017-06-20 19:27:14 -06:00
2018-08-24 13:09:03 +02:00
2017-07-03 16:56:25 -06:00