Re: [linux-usb-devel] Container_of considered harmful - was Re: usb storage sddr09

From: Matthew Dharm (mdharm-kernel@one-eyed-alien.net)
Date: Sun Oct 20 2002 - 23:12:38 EST


Actually, I've seen this one with 2.5.44 and no USB storage devices
attached. Just load usb-storage and it OOPSes.

I haven't been able to find it yet, but I haven't looked as hard as I
could.

Matt

On Sun, Oct 20, 2002 at 08:24:36PM +0200, Andries Brouwer wrote:
> > Both of these are fixed with 2.4.44
>
> Yes, there is progress. Not to say that there are no oopses left,
> but with 2.5.44 the oopses are different.
>
> Let me just report one, don't know whether I'll have time to track
> what happens.
>
> Insert and remove a usb-storage device while usb-storage
> is not loaded. Now load usb-storage. Oops.
>
> The oops is a dereference of fffffff0 in base/bus.c:driver_attach().
> I have seen several such oopses lately, various places in the kernel.
> The cause here is a NULL pointer that is turned into fffffff0 by
> container_of() and then fed to get_device(). And get_device() tests
> that it gets a non-NULL pointer, but that does not protect against
> fffffff0.
>
> Andries
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> Access Your PC Securely with GoToMyPC. Try Free Now
> https://www.gotomypc.com/s/OSND/DD
> _______________________________________________
> linux-usb-devel@lists.sourceforge.net
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

What, are you one of those Microsoft-bashing Linux freaks? -- Customer to Greg User Friendly, 2/10/1999


- 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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:51 EST