APPLIED: [SRU][n][PATCH 0/2] Fix deadlock during suspending md raid

Roxana Nicolescu roxana.nicolescu at canonical.com
Mon Aug 26 07:22:30 UTC 2024


On 20/08/2024 20:01, Philip Cox wrote:
> BugLink: https://bugs.launchpad.net/bugs/2073695
>
>
> SRU Justification:
>
> [Impact]
> There is a possible deadlock when suspending a system with a MD RAID.
>
> This deadlock was introduced via upstream commit
> fa2bbff7b0b4e211fec5e5686ef96350690597b5.
>
> The deadlock was exposed while trying to fix another deadlock, so
> this patchset contains two patches.  The first fixes the fix, and
> the second fixes the new deadlock.  With these two patches, the
> deadlock has been resolved, and the existing code was cleaned up.
>
>
> [Fix]
> Upstream commits:
>     - 03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126
>     - 611d5cbc0b35a752e657a83eebadf40d814d006b
>
> where used to resolve the deadlocks.  The first patch cleans up
> some of the logic, and the second resolves the deadlock.
>
> [Test Plan]
> I have tested this patch.
>
> [Where problems could occur]
> As this code change touches the locking of the MD driver there
> is some risk of introducing new locking issues.  As this change
> has been upstreamed for some time now, and has been back-ported
> to some of the upstreeam stable kernels, I feel that risk is
> fairly low.
>
> --
>
>
> Li Nan (2):
>    md: change the return value type of md_write_start to void
>    md: fix deadlock between mddev_suspend and flush bio
>
>   drivers/md/md.c     | 40 +++++++++++++++++++---------------------
>   drivers/md/md.h     |  2 +-
>   drivers/md/raid1.c  |  3 +--
>   drivers/md/raid10.c |  3 +--
>   drivers/md/raid5.c  |  3 +--
>   5 files changed, 23 insertions(+), 28 deletions(-)
>
Applied to noble:linux master-next branch. Thanks!



More information about the kernel-team mailing list