scsi: target: tcmu: Prevent memory reclaim recursion
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 8 Nov 2019 08:29:01 +0000 (17:29 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 9 Nov 2019 02:37:24 +0000 (21:37 -0500)
commit0eccce866f84db2cd23e1f28737920aa7b9e70d7
tree7d80a39d9a4ca71f3bc793a6cac715a434fbf90d
parent9237f04e12cc385334043cd7cf84b74dcbda0256
scsi: target: tcmu: Prevent memory reclaim recursion

Prevent recursion into the IO path under low memory conditions by using
GFP_NOIO in place of GFP_KERNEL when allocating a new command with
tcmu_alloc_cmd() and user ring space with tcmu_get_empty_block().

Link: https://lore.kernel.org/r/20191108082901.417950-1-damien.lemoal@wdc.com
Reported-by: Masato Suzuki <masato.suzuki@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Acked-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_user.c