NFC: Atomic socket allocation

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

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
Samuel Ortiz 2011-12-14 16:43:08 +01:00 • committed by John W. Linville
commit db81a62451

View file

@ -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;