On Tue, Nov 22, 2022 at 12:57:15PM +0100, Jan Kara wrote: > On Mon 21-11-22 10:15:58, Jeremi Piotrowski wrote: > > On Mon, Nov 21, 2022 at 04:00:18PM +0100, Jan Kara wrote: > > > > > > OK, attached patch fixes the deadlock for me. Can you test whether it fixes > > > the problem for you as well? Thanks! > > > > I'll test the fix tomorrow, but I've noticed it doesn't apply cleanly to > > 5.15.78, which seems to be missing: > > > > - 5fc4cbd9fde5d4630494fd6ffc884148fb618087 mbcache: Avoid nesting of cache->c_list_lock under bit locks > > (this one is marked for stable but not in 5.15?) > > - 307af6c879377c1c63e71cbdd978201f9c7ee8df mbcache: automatically delete entries from cache on freeing > > (this one is not marked for stable) > > > > So either a special backport is needed or these two would need to be applied as > > well. > > Right. The fix is against current mainline kernel. Stable tree backports > are a second step once the fix is confirmed to work :). Let me know in case > you need help with porting to the kernel version you need for testing. > I confirm that this patch fixes things with the more complicated reproducer :) Attached is my tweaked version of the patch that applies against 5.15.