Re: [PATCH] mm/slub: fix a deadlock in shuffle_freelist()

From: Sebastian Andrzej Siewior
Date: Tue Sep 17 2019 - 03:16:48 EST


On 2019-09-16 17:31:34 [-0400], Qian Cai wrote:
â
> get_random_u64() is also busted.
â
> [ÂÂ753.486588]ÂÂPossible unsafe locking scenario:
>
> [ÂÂ753.493890]ÂÂÂÂÂÂÂÂCPU0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂCPU1
> [ÂÂ753.499108]ÂÂÂÂÂÂÂÂ----ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ----
> [ÂÂ753.504324]ÂÂÂlock(batched_entropy_u64.lock);
> [ÂÂ753.509372]ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlock(&(&zone->lock)->rlock);
> [ÂÂ753.516675]ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlock(batched_entropy_u64.lock);
> [ÂÂ753.524238]ÂÂÂlock(random_write_wait.lock);
> [ÂÂ753.529113]Â
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*** DEADLOCK ***

This is the same scenario as the previous one in regard to the
batched_entropy_â.lock.

Sebastian