]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite8a381b9e210c82cadd1c878e0375cc7ba5996b2
tree5b6ac2865bf6458ade12593b6c7d9b1601e25565
parent921e5dda3ba48a6ca75ceadce0fdf4a3e00f91c8
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