Mikulas Patocka
d65ec240b3
dm snapshot: properly fix a crash when an origin has no snapshots
...
commit 7e768532b2396bcb7fbf6f82384b85c0f1d2f197 upstream.
If an origin target has no snapshots, o->split_boundary is set to 0.
This causes BUG_ON(sectors <= 0) in block/bio.c:bio_split().
Fix this by initializing chunk_size, and in turn split_boundary, to
rounddown_pow_of_two(UINT_MAX) -- the largest power of two that fits
into "unsigned" type.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-03 08:59:02 +02:00
..
2021-03-04 10:26:43 +01:00
2021-05-11 14:04:18 +02:00
2020-03-25 08:25:48 +01:00
2021-03-09 11:09:37 +01:00
2020-09-09 19:12:35 +02:00
2020-03-12 13:00:23 +01:00
2020-04-17 10:50:24 +02:00
2020-04-17 10:50:23 +02:00
2020-04-17 10:50:24 +02:00
2021-03-04 10:26:51 +01:00
2021-03-04 10:26:51 +01:00
2019-04-26 11:29:32 -04:00
2019-08-21 11:27:17 -04:00
2021-03-04 10:26:53 +01:00
2019-05-16 15:55:48 -07:00
2019-07-11 20:04:37 -06:00
2019-07-15 11:03:01 -03:00
2021-05-11 14:04:18 +02:00
2021-03-30 14:35:24 +02:00
2019-08-15 15:57:39 -04:00
2019-07-11 20:04:37 -06:00
2019-07-09 14:13:33 -04:00
2020-09-09 19:12:35 +02:00
2019-08-26 11:05:32 -04:00
2021-05-11 14:04:15 +02:00
2021-05-11 14:04:18 +02:00
2019-03-05 14:48:50 -05:00
2020-01-23 08:22:32 +01:00
2021-06-03 08:59:02 +02:00
2019-09-04 09:39:22 -04:00
2019-03-05 14:48:51 -05:00
2021-03-11 14:06:49 +01:00
2019-04-25 15:38:52 -04:00
2020-09-09 19:12:36 +02:00
2019-12-21 11:05:01 +01:00
2020-02-24 08:36:49 +01:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-04-21 12:56:15 +02:00
2021-04-21 12:56:15 +02:00
2021-03-30 14:35:24 +02:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2019-08-23 10:13:14 -04:00
2021-03-04 10:26:51 +01:00
2020-06-24 17:50:31 +02:00
2020-06-24 17:50:31 +02:00
2020-07-09 09:37:57 +02:00
2019-12-17 19:56:12 +01:00
2021-03-11 14:06:49 +01:00
2021-03-11 14:06:49 +01:00
2021-01-27 11:47:42 +01:00
2019-09-12 09:32:31 -04:00
2021-05-14 09:44:12 +02:00
2020-12-30 11:51:45 +01:00
2019-05-24 17:27:13 +02:00
2019-12-17 19:56:14 +01:00
2019-12-17 19:56:14 +01:00
2021-05-14 09:44:13 +02:00
2019-12-17 19:56:14 +01:00
2020-01-23 08:22:32 +01:00
2019-09-13 13:10:05 -07:00
2019-06-15 01:37:35 -06:00
2021-05-11 14:04:15 +02:00
2019-06-05 17:36:37 +02:00
2019-03-12 10:15:18 -07:00
2019-06-05 17:36:37 +02:00
2020-11-05 11:43:22 +01:00
2019-09-13 13:14:43 -07:00
2021-01-06 14:48:35 +01:00