Re: [PATCH-next v4] loop: loop_set_status_from_info() check before assignment

From: Jens Axboe
Date: Wed Feb 22 2023 - 22:43:47 EST



On Tue, 21 Feb 2023 17:50:27 +0800, Zhong Jinghua wrote:
> In loop_set_status_from_info(), lo->lo_offset and lo->lo_sizelimit should
> be checked before reassignment, because if an overflow error occurs, the
> original correct value will be changed to the wrong value, and it will not
> be changed back.
>
> More, the original patch did not solve the problem, the value was set and
> ioctl returned an error, but the subsequent io used the value in the loop
> driver, which still caused an alarm:
>
> [...]

Applied, thanks!

[1/1] loop: loop_set_status_from_info() check before assignment
commit: 9f6ad5d533d1c71e51bdd06a5712c4fbc8768dfa

Best regards,
--
Jens Axboe