summaryrefslogtreecommitdiff
path: root/net/bluetooth/bnep
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-01-25 20:38:15 +0100
committerAdrian Bunk <bunk@stusta.de>2007-01-26 20:49:22 +0100
commitc2afb6058b25bc201d7ca24e2541941d09d03ae9 (patch)
tree97fcec4a42a3d4faa21ca188b74cba4ccd1a533c /net/bluetooth/bnep
parentac4d63dab8bb425f1ae037abf349090c12f16883 (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> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net/bluetooth/bnep')
-rw-r--r--net/bluetooth/bnep/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index 8f7da1eac83e..e9b63e61c839 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -215,7 +215,7 @@ static int bnep_sock_create(struct socket *sock, int protocol)
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
- sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, &bnep_proto, 1);
+ sk = sk_alloc(PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto, 1);
if (!sk)
return -ENOMEM;