From: Hugh Dickins <hugh@veritas.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
linux-kernel@vger.kernel.org
Subject: [PATCH] fix pcmcia_device_remove oops
Date: Fri, 10 Mar 2006 21:15:19 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0603102113490.4517@goblin.wat.veritas.com> (raw)
Fix pcmcia_device_remove NULL pointer dereference at shutdown.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
Unlike its older brother, this oops has not yet graduated from -mm to
mainline. I've not yet seen my cards working in -mm (maybe intermittent
anomaly at my end), and saw oops when removing and inserting card; but
follow those issues up another time, this is a good start just for
closing down the box.
drivers/pcmcia/ds.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- 2.6.16-rc5-mm3/drivers/pcmcia/ds.c 2006-03-07 11:43:21.000000000 +0000
+++ linux/drivers/pcmcia/ds.c 2006-03-10 17:40:04.000000000 +0000
@@ -464,7 +464,7 @@ static int pcmcia_device_remove(struct d
* all devices
*/
did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
- if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
+ if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
(p_dev->socket->device_count != 0) &&
(p_dev->device_no == 0))
pcmcia_card_remove(p_dev->socket, p_dev);
reply other threads:[~2006-03-10 21:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.61.0603102113490.4517@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®