aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-10-15 11:31:14 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-16 02:14:34 -0400
commit74da626a1098640ddc40c0e3481c0cd41e8ec1e9 (patch)
tree65e6f72f07c0cccbb37b3b079d93276b061d9ade /net/bluetooth/hci_sock.c
parentcb19d9ea2ce2bcbe291d3d48e3501dc4f33ba627 (diff)
[Bluetooth] Add locking for bt_proto array manipulation
The bt_proto array needs to be protected by some kind of locking to prevent a race condition between bt_sock_create and bt_sock_register. And in addition all calls to sk_alloc need to be made GFP_ATOMIC now. Signed-off-by: Masatake YAMATO <jet@gyve.org> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 1a35d343e08a..f26a9eb49945 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -618,7 +618,7 @@ static int hci_sock_create(struct socket *sock, int protocol)
618 618
619 sock->ops = &hci_sock_ops; 619 sock->ops = &hci_sock_ops;
620 620
621 sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, &hci_sk_proto, 1); 621 sk = sk_alloc(PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto, 1);
622 if (!sk) 622 if (!sk)
623 return -ENOMEM; 623 return -ENOMEM;
624 624