From: Tejun Heo <htejun@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Mark Lord <mlord@pobox.com>, Jeff Garzik <jeff@garzik.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [libata-dev #upstream-fixes] pata_legacy: don't call ata_host_detach() after initialization failure
Date: Wed, 13 Feb 2008 18:20:19 +0900 [thread overview]
Message-ID: <47B2B653.7020408@gmail.com> (raw)
In-Reply-To: <20080213090159.GA21614@elte.hu>
ata_host_detach() detaches an attached port and shouldn't be called on
a port which hasn't been attached yet. pata_legacy incorrectly calls
ata_host_detach() on unattached port after initialization failure
causing oops. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
---
drivers/ata/pata_legacy.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 333dc15..7383f19 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -1278,8 +1278,6 @@ static __init int legacy_init_one(struct legacy_probe *probe)
}
}
fail:
- if (host)
- ata_host_detach(host);
platform_device_unregister(pdev);
return ret;
}
next parent reply other threads:[~2008-02-13 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.1.00.0802101603240.2920@woody.linux-foundation.org>
[not found] ` <20080212081816.GA17820@elte.hu>
[not found] ` <20080212071452.5c58ae6d@laptopd505.fenrus.org>
[not found] ` <20080213090159.GA21614@elte.hu>
2008-02-13 9:20 ` Tejun Heo [this message]
2008-02-13 9:24 ` [libata-dev #upstream-fixes] pata_legacy: don't call ata_host_detach() after initialization failure Ingo Molnar
2008-02-15 18:52 ` Jeff Garzik
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=47B2B653.7020408@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mlord@pobox.com \
--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;
as well as URLs for NNTP newsgroup(s).