Skip to contentSkip to conversation

fix boot hang on some architectures

PATCH In review James Bottomley 3 participants 3 messages Apr 2, 2005 – Apr 3, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix boot hang on some architectures

Well, this is a brown paper bag for someone. 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.

===== net/core/sock.c 1.67 vs edited =====

net/core/sock.c +1 -1
@@ -1352,7 +1352,7 @@
 
 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)
#1 lore raw

Em Sat, Apr 02, 2005 at 01:46:03PM -0600, James Bottomley escreveu:

Quoted 1 line

Well, this is a brown paper bag for someone. The new protocol

/me using such bag now :(

Thanks a lot for the fix.

David, Please apply.

Quoted 24 lines

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.

===== net/core/sock.c 1.67 vs edited =====

net/core/sock.c +1 -1
@@ -1352,7 +1352,7 @@
 
 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)
maintainer
#2 lore raw
Quoted 8 lines · On Sun, 3 Apr 2005 12:21:01 -0300 Arnaldo Carvalho de Melo…

Em Sat, Apr 02, 2005 at 01:46:03PM -0600, James Bottomley escreveu:

Quoted 1 line

Well, this is a brown paper bag for someone. The new protocol

/me using such bag now :(

Thanks a lot for the fix.

David, Please apply.

Done, thanks everyone.