Skip to content

Commit db81a62

Browse files
Samuel Ortizlinvjw
authored andcommitted
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>
1 parent 94a098d commit db81a62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/nfc/rawsock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int rawsock_create(struct net *net, struct socket *sock,
310310

311311
sock->ops = &rawsock_ops;
312312

313-
sk = sk_alloc(net, PF_NFC, GFP_KERNEL, nfc_proto->proto);
313+
sk = sk_alloc(net, PF_NFC, GFP_ATOMIC, nfc_proto->proto);
314314
if (!sk)
315315
return -ENOMEM;
316316

0 commit comments

Comments
 (0)