|
From: <bva...@us...> - 2015-01-13 08:51:16
|
Revision: 5964
http://sourceforge.net/p/scst/svn/5964
Author: bvassche
Date: 2015-01-13 08:51:08 +0000 (Tue, 13 Jan 2015)
Log Message:
-----------
scst_parse_unmap_descriptors(): Avoid using GFP_KERNEL in atomic context
Reported-by: Shahar Salzman <sha...@ka...>
Signed-off-by: Bart Van Assche <bva...@ac...>
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2015-01-13 08:42:28 UTC (rev 5963)
+++ trunk/scst/src/scst_targ.c 2015-01-13 08:51:08 UTC (rev 5964)
@@ -1734,9 +1734,17 @@
out_descr:
if (unlikely(cmd->op_flags & SCST_DESCRIPTORS_BASED)) {
- int r = scst_parse_descriptors(cmd);
- if (unlikely(r != 0))
+ if (scst_cmd_atomic(cmd)) {
+ /*
+ * Switch to thread context such that
+ * scst_parse_descriptors() can use GFP_KERNEL instead
+ * of GFP_ATOMIC.
+ */
+ res = SCST_CMD_STATE_RES_NEED_THREAD;
goto out;
+ }
+ if (unlikely(scst_parse_descriptors(cmd) != 0))
+ goto out;
}
out:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|