]> git.baikalelectronics.ru Git - kernel.git/commit
zram: Fix __zram_bvec_{read,write}() locking order
authorPeter Zijlstra <peterz@infradead.org>
Mon, 19 Oct 2020 10:13:53 +0000 (12:13 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Oct 2020 15:32:28 +0000 (09:32 -0600)
commit8ac5f7cff780e109f9eabbaab672d303a25033cd
tree6be6035e5b2230562ba0958969194486392bb32e
parent837b1a3d137180d940982aba42a5a1b49ca95887
zram: Fix __zram_bvec_{read,write}() locking order

Mikhail reported a lockdep spat detailing how __zram_bvec_read() and
__zram_bvec_write() use zstrm->lock and zspage->lock in opposite order.

Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/zram/zram_drv.c