All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: Ed Tomlinson <tomlins@cam.org>
Cc: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Subject: Container_of considered harmful - was Re: usb storage sddr09
Date: Sun, 20 Oct 2002 20:24:36 +0200	[thread overview]
Message-ID: <20021020182436.GA25975@win.tue.nl> (raw)
In-Reply-To: <200210200952.23430.tomlins@cam.org>

> 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

  reply	other threads:[~2002-10-20 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-18  1:55 usb storage sddr09 Ed Tomlinson
2002-10-18 19:35 ` Andries Brouwer
2002-10-20 13:52   ` Ed Tomlinson
2002-10-20 18:24     ` Andries Brouwer [this message]
2002-10-21  4:12       ` [linux-usb-devel] Container_of considered harmful - was " Matthew Dharm
2002-10-23  1:43       ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021020182436.GA25975@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tomlins@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.