regression: block: take bd_mutex around delete_partitions in del_gendisk

From: Colin Ian King <hidden>
Date: 2021-06-02 19:10:38

Hi,

I've hit a regression in the 5.13-rc4 kernel with loop mounting. When
running the stress-ng loop stress test with multiple CPUs (e.g. 8) with
multiple stressors I get softlock hangs with the following commit:

commit c76f48eb5c084b1e15c931ae8cc1826cd771d70d (refs/bisect/bad)
Author: Christoph Hellwig [off-list ref]
Date:   Tue Apr 6 08:22:56 2021 +0200

    block: take bd_mutex around delete_partitions in del_gendisk

How to reproduce (run on a multi-threaded machine):

git clone git://kernel.ubuntu.com/cking/stress-ng
cd stress-ng
make clean
make
sudo ./stress-ng --loop 8 -t 60 -v

Without the commit the stress test will complete. With the commit the
stressors will softlock up after a couple of minutes or so.

The stress-ng stressor does force some races as it does rapid loopback
exercising.

Colin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help