]> git.itanic.dy.fi Git - linux-stable/commitdiff
iscsit: use GFP_ATOMIC under spin lock
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 23 Nov 2012 04:07:39 +0000 (12:07 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:18 +0000 (03:33 +0000)
commit 3c989d7603872bf878840f7ce3ea49b73bea4c6c upstream.

The function iscsit_build_conn_drop_async_message() is called
from iscsit_close_connection() with spin lock 'sess->conn_lock'
held, so we should use GFP_ATOMIC instead of GFP_KERNEL.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/iscsi/iscsi_target.c

index 6fa72220bbea086796e93d3eff71867b522086a6..3effde29c17aa06e6a16f4e20ae75e7102995d05 100644 (file)
@@ -2367,7 +2367,7 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)
        if (!conn_p)
                return;
 
-       cmd = iscsit_allocate_cmd(conn_p, GFP_KERNEL);
+       cmd = iscsit_allocate_cmd(conn_p, GFP_ATOMIC);
        if (!cmd) {
                iscsit_dec_conn_usage_count(conn_p);
                return;