浏览代码

NFC: Atomic socket allocation

rawsock_create() is called with preemption disabled, so we should not
sleep.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz 13 年之前
父节点
当前提交
db81a62451
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/nfc/rawsock.c

+ 1 - 1
net/nfc/rawsock.c

@@ -310,7 +310,7 @@ static int rawsock_create(struct net *net, struct socket *sock,
 
 	sock->ops = &rawsock_ops;
 
-	sk = sk_alloc(net, PF_NFC, GFP_KERNEL, nfc_proto->proto);
+	sk = sk_alloc(net, PF_NFC, GFP_ATOMIC, nfc_proto->proto);
 	if (!sk)
 		return -ENOMEM;