Files
linux/drivers/block
Martijn Coenen 3531913b68 loop: Set correct device size when using LOOP_CONFIGURE
commit 79e5dc59e2 upstream.

The device size calculation was done before processing the loop
configuration, which meant that the we set the size on the underlying
block device incorrectly in case lo_offset/lo_sizelimit were set in the
configuration. Delay computing the size until we've setup the device
parameters correctly.

Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl")
Reported-by: Lennart Poettering <mzxreary@0pointer.de>
Tested-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-23 12:59:49 +02:00
..
2020-05-27 05:21:23 -06:00
2019-11-28 10:40:47 -07:00
2020-03-27 10:23:43 -06:00
2020-03-27 10:23:43 -06:00
2018-11-09 08:14:14 -07:00