scsi: elx: efct: Don't use GFP_KERNEL under spin lock
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 11 Jan 2022 01:24:41 +0000 (09:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:27:07 +0000 (17:27 +0100)
commit9c2ece4852a628dadb716e3596e6c9c3aa198b3f
tree3a90f16cc0ed75f247681f98ac5ee26598b0550b
parentdaf9ac79e75b1e396c3c4f2113d5344e3ce27dcb
scsi: elx: efct: Don't use GFP_KERNEL under spin lock

commit 61263b3a11a2594b4e898f166c31162236182b5c upstream.

GFP_KERNEL/GFP_DMA can't be used under a spin lock. According the comment,
els_ios_lock is used to protect els ios list so we can move down the spin
lock to avoid using this flag under the lock.

Link: https://lore.kernel.org/r/20220111012441.3232527-1-yangyingliang@huawei.com
Fixes: 8f406ef72859 ("scsi: elx: libefc: Extended link Service I/O handling")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/elx/libefc/efc_els.c