From 6dc08eb5b6b27f9401d289631369ebf53b4d766b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 12 Feb 2019 03:08:39 +0000 Subject: [PATCH] scst_vdisk: Avoid that fileio_alloc_and_parse() locks up in tasklet context if low on memory git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7920 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 8899bddeb..229f6a58d 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3092,7 +3092,8 @@ static int fileio_alloc_and_parse(struct scst_cmd *cmd) TRACE_ENTRY(); - p = kmem_cache_zalloc(vdisk_cmd_param_cachep, cmd->cmd_gfp_mask); + p = kmem_cache_zalloc(vdisk_cmd_param_cachep, + in_interrupt() ? GFP_ATOMIC : cmd->cmd_gfp_mask); if (!p) { scst_set_busy(cmd); goto out_err;