[lkml]   [2001]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 2.4.10-pre13: ATM drivers cause panic
> 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!

How about

static struct atm_dev *alloc_atm_dev(const char *type)
struct atm_dev *dev;

dev = kmalloc(sizeof(*dev),GFP_KERNEL);
if (!dev) return NULL;
dev->type = type;
dev->signal = ATM_PHY_SIG_UNKNOWN;
dev->link_rate = ATM_OC3_PCR;
dev->next = NULL;


dev->prev = last_dev;

if (atm_devs) last_dev->next = dev;
else atm_devs = dev;
last_dev = dev;
return dev;

instead. That seems to fix alloc_atm_dev safely. Refcounting wants adding
to atm_dev objects too, its impossible currently to make atm_find_dev
remotely safe


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.094 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site