[PATCH] 2.4.10-pre13: ATM drivers cause panic

Till Immanuel Patzschke (tip@internetwork-ag.de)
Sat, 22 Sep 2001 15:36:20 +0200


Hi,

seems a couple of spin_lock(s) and a spin_unlock was missing.
Why didn't this problem show up with earlier releases ???
Anyways, please find a (quick) patch below. It would be great if this patch or
any other similar could make it into the next release!
Thanks,

Immanuel

diff -Naur net/atm/resources.c.bug net/atm/resources.c
--- net/atm/resources.c.bug Fri Dec 29 23:35:47 2000
+++ net/atm/resources.c Sat Sep 22 15:31:35 2001
@@ -76,14 +76,17 @@
{
struct atm_dev *dev;

+ spin_lock (&atm_dev_lock);
dev = alloc_atm_dev(type);
if (!dev) {
printk(KERN_ERR "atm_dev_register: no space for dev %s\n",
type);
+ spin_unlock (&atm_dev_lock);
return NULL;
}
if (number != -1) {
if (atm_find_dev(number)) {
+ spin_unlock (&atm_dev_lock);
free_atm_dev(dev);
return NULL;
}

--
Till Immanuel Patzschke                 mailto: tip@internetwork-ag.de
interNetwork AG                         Phone:  +49-(0)611-1731-121
Bierstadter Str. 7                      Fax:    +49-(0)611-1731-31
D-65189 Wiesbaden                       Web:    http://www.internetwork-ag.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/