]> git.baikalelectronics.ru Git - kernel.git/commit
sbitmap: Protect swap_lock from hardirq
authorMing Lei <ming.lei@redhat.com>
Tue, 15 Jan 2019 03:59:52 +0000 (11:59 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jan 2019 04:29:57 +0000 (16:29 +1200)
commita3e24e0fab9a836354551136536feed37b794372
tree4fda8ebbcb82694899a476026684951e25d9b853
parentdef0dbf819a5cfaefd2e8320852763a03fc705a8
sbitmap: Protect swap_lock from hardirq

Because we may call blk_mq_get_driver_tag() directly from
blk_mq_dispatch_rq_list() without holding any lock, then HARDIRQ may
come and the above DEADLOCK is triggered.

Commit ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq") tries to
fix this issue by using 'spin_lock_bh', which isn't enough because we
complete request from hardirq context direclty in case of multiqueue.

Cc: Clark Williams <williams@redhat.com>
Fixes: ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq")
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/sbitmap.c