scsi: target: tcmu: Use GFP_NOIO while handling cmds or holding cmdr_lock
authorBodo Stroesser <bostroesser@gmail.com>
Fri, 5 Mar 2021 19:00:09 +0000 (20:00 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 10 Mar 2021 04:47:17 +0000 (23:47 -0500)
commit1080782f13e3604351e690bd2fa84ebc3b4847f6
tree5b6ac2865bf6458ade12593b6c7d9b1601e25565
parentf7c89771d07dce0e0ac6c4d8d2048d9aa7e1542c
scsi: target: tcmu: Use GFP_NOIO while handling cmds or holding cmdr_lock

Especially when using tcmu with tcm_loop, memory allocations with
GFP_KERNEL for a LUN can cause write back to the same LUN.

So we have to use GFP_NOIO when allocation is done while handling commands
or while holding cmdr_lock.

Link: https://lore.kernel.org/r/20210305190009.32242-1-bostroesser@gmail.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bodo Stroesser <bostroesser@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_user.c