From: Hugh Dickins <hugh@veritas.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
Dominik Brodowski <linux@dominikbrodowski.net>,
linux-kernel@vger.kernel.org
Subject: [PATCH] fix pcmcia_device_probe oops
Date: Fri, 10 Mar 2006 21:13:44 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0603102111460.4517@goblin.wat.veritas.com> (raw)
Fix pcmcia_device_probe NULL pointer dereference at startup.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
This oops was in -mm for a long time, sorry, I never got around to
investigating it then; but now it has graduated to mainline -rc5-git.
It may well be a consequence of my ignoring pcmcia's "please expect
breakage unless you upgrade to new tools" - but I think this is not a
permissible kind of breakage, and my cards work as before with the fix.
drivers/pcmcia/ds.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- 2.6.16-rc5-git14/drivers/pcmcia/ds.c 2006-03-10 10:07:30.000000000 +0000
+++ linux/drivers/pcmcia/ds.c 2006-03-10 17:16:27.000000000 +0000
@@ -411,7 +411,7 @@ static int pcmcia_device_probe(struct de
* pseudo devices, and if not, add the second one.
*/
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 == 1) && (p_dev->device_no == 0))
pcmcia_add_pseudo_device(p_dev->socket);
reply other threads:[~2006-03-10 21:12 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.0603102111460.4517@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=torvalds@osdl.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 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®