Files
linux/drivers/md
Mikulas Patocka 24f9751a40 dm snapshot: properly fix a crash when an origin has no snapshots
commit 7e768532b2 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>
2023-05-16 11:09:57 +09:00
..
2014-01-14 23:23:03 -05:00
2017-01-31 13:55:27 -08:00
2017-01-31 10:45:54 -08:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-01-20 13:52:20 -08:00
2017-10-21 17:21:35 +02:00
2016-09-21 09:09:44 -07:00
2016-08-07 14:41:02 -06:00
2015-08-13 12:31:57 -06:00