Commit c3adeb60 authored by Yufen Yu's avatar Yufen Yu Committed by Yang Yingliang
Browse files

scsi: do quiesce for enclosure driver



hulk inclusion
category: bugfix
bugzilla: 46860

--------------------------------

Drivers (such as scsi enclosure) will not call blk_register_queue()
to do initialize for request_queue. And we rely on driver self
to deal with the race in that case when cleanup queue.

But, some self-developed drivers cannot deal the race. To avoid
null pointer reference as following, we do quiesce in kernel.

[67760.308034] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
...
[67760.308069] pc : blk_mq_do_dispatch_sched+0x94/0x130
[67760.308072] lr : blk_mq_sched_dispatch_requests+0x128/0x1f0
[67760.308072] sp : ffff0000b2bb3ca0
[67760.308073] x29: ffff0000b2bb3ca0 x28: 0000000000000000
[67760.308075] x27: 0000000000000000 x26: ffff00008128a000
[67760.308076] x25: ffff8042b13e9700 x24: 0000000000000000
[67760.308077] x23: ffff0000b2bb3cf8 x22: ffff8042b2976808
[67760.308078] x21: ffff0000b2bb3d58 x20: ffff00008128a000
[67760.308079] x19: ffff8042b2976800 x18: 0000000000000000
[67760.308080] x17: 0000000000000000 x16: 0000000000000000
[67760.308081] x15: 0000000000000000 x14: 0000000000000000
[67760.308082] x13: 0000000000000000 x12: 0000000000000000
[67760.308084] x11: ffff800040801004 x10: ffff80004080100c
[67760.308085] x9 : 0000000000000060 x8 : ffff809e58f7e500
[67760.308087] x7 : 0000000000000000 x6 : 00000000ffffffff
[67760.308088] x5 : ffff000080ab7550 x4 : ffff80418e84ec80
[67760.308089] x3 : ffff0000815d7f10 x2 : 94e133dc71839c00
[67760.308090] x1 : 0000000000000000 x0 : ffff00008128a748
[67760.308091] Call trace:
[67760.308093]  blk_mq_do_dispatch_sched+0x94/0x130
[67760.308095]  blk_mq_sched_dispatch_requests+0x128/0x1f0
[67760.308096]  __blk_mq_run_hw_queue+0x98/0x138
[67760.308097]  blk_mq_run_work_fn+0x28/0x38

Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent e8025b2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment