2001-04-23 11:03:20

by Takanori Kawano

[permalink] [raw]
Subject: [PATCH]Bug in lib/brlock.c


I think lib/brlock.c need to be fixed as:

--- lib/brlock.c Tue Apr 25 05:59:56 2000
+++ lib/brlock.c.fixed Mon Apr 23 19:56:43 2001
@@ -25,7 +25,7 @@
int i;

for (i = 0; i < smp_num_cpus; i++)
- write_lock(__brlock_array[idx] + cpu_logical_map(i));
+ write_lock(&__brlock_array[cpu_logical_map(i)][idx]);
}

void __br_write_unlock (enum brlock_indices idx)
@@ -33,7 +33,7 @@
int i;

for (i = 0; i < smp_num_cpus; i++)
- write_unlock(__brlock_array[idx] + cpu_logical_map(i));
+ write_unlock(&__brlock_array[cpu_logical_map(i)][idx]);
}

#else /* ! __BRLOCK_USE_ATOMICS */


For the above, 2.4.1 kernel often panics on our socket onen/close
stress testing.

regards,

---
Takanori Kawano
Hitachi Ltd,
Internet Systems Platform Division
[email protected]