Skip to content

Commit

Permalink
NFC: Atomic socket allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Dec 14, 2011
1 parent 94a098d commit db81a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/rawsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit db81a62

Please sign in to comment.