From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <magnus.damm@gmail.com>,
Jeff Garzik <jeff@garzik.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: pata_platform: Fix NULL pointer dereference
Date: Fri, 20 Jul 2007 12:50:58 +0900 [thread overview]
Message-ID: <20070720035058.25300.28389.sendpatchset@clockwork.opensource.se> (raw)
pata_platform: Fix NULL pointer dereference
pata_platform currently dereferences a NULL pointer in pata_platform_probe()
if pdev->dev.platform_data is set to NULL. This breakage was most likely
introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
Tested on a Solution Engline 7722 board, fixes NULL dereference problem.
Applies to linux-2.6 git 9a79b2274186fade17134929d4f85b70d59a3840
Could someone please make sure this gets included in rc1?
drivers/ata/pata_platform.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- 0001/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c 2007-07-20 12:09:04.000000000 +0900
@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe
pata_platform_setup_port(&ap->ioaddr, pp_info);
/* activate */
- return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt,
- pp_info->irq_flags, &pata_platform_sht);
+ return ata_host_activate(host, platform_get_irq(pdev, 0),
+ ata_interrupt, pp_info ? pp_info->irq_flags
+ : 0, &pata_platform_sht);
}
/**
next reply other threads:[~2007-07-20 3:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070720035058.25300.28389.sendpatchset@clockwork.opensource.s e>
2007-07-20 3:50 ` Magnus Damm [this message]
2007-07-20 4:02 ` pata_platform: Fix NULL pointer dereference Paul Mundt
2007-07-20 11:46 ` Jeff Garzik
2007-07-20 16:12 ` Linus Torvalds
2007-07-21 15:46 ` Jan Engelhardt
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=20070720035058.25300.28389.sendpatchset@clockwork.opensource.se \
--to=magnus.damm@gmail.com \
--cc=jeff@garzik.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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