diff options
author | James Bottomley <james.bottomley@steeleye.com> | 2005-04-03 00:19:12 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-04-03 00:19:12 -0700 |
commit | 12f46cc58e58b65ec1662558581c2ca83cb16342 (patch) | |
tree | a15b726b8ef96682974274a6b207b690b5a5d214 | |
parent | f4398129a30a4753ab091e7cbe0533a05c4b180b (diff) | |
download | history-12f46cc58e58b65ec1662558581c2ca83cb16342.tar.gz |
[NET]: Missing proto_list_lock initialization.
The new protocol registration locking uses a rwlock to limit access
to the protocol list. Unfortunately, the initialisation:
static rwlock_t proto_list_lock;
Only works to initialise the lock as unlocked on platforms whose unlock
signal is all zeros. On other platforms, they think it's already locked
and hang forever.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 29e8a34d83edb4..629ab4a5b45b5a 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1352,7 +1352,7 @@ void sk_common_release(struct sock *sk) EXPORT_SYMBOL(sk_common_release); -static rwlock_t proto_list_lock; +static DEFINE_RWLOCK(proto_list_lock); static LIST_HEAD(proto_list); int proto_register(struct proto *prot, int alloc_slab) |