Re: swapon/913 is trying to acquire lock at zcomp_stream_get+0x5/0x90 [zram] but task is already holding lock at zs_map_object+0x7a/0x2e0

From: Mikhail Gavrilov
Date: Fri Oct 16 2020 - 10:00:44 EST


On Fri, 16 Oct 2020 at 17:40, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
>
> Joy... __zram_bvec_write() and __zram_bvec_read() take these locks in
> opposite order.
>
> Does something like the (_completely_) untested below cure things?

Excellent! This patch (_completely_) cured all other warnings which
were present in the log.
dmesg before patch: https://pastebin.com/tZY3npHG
dmesg after patch: https://pastebin.com/iD7ZL1mb

Thanks!

--
Best Regards,
Mike Gavrilov.