From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: christoph@lameter.com
Cc: linux-kernel@vger.kernel.org, b.zolnierkiewicz@elka.pw.edu.pl
Subject: [PATCH] ide-disk oopses on boot
Date: Tue, 9 Aug 2005 15:27:26 +0200 [thread overview]
Message-ID: <20050809132725.GA20397@vana.vc.cvut.cz> (raw)
Hello Christoph,
back in June your '[PATCH] NUMA aware block device control structure
allocation' patch went in, changing ide-disk.c's code:
- g = alloc_disk(1 << PARTN_BITS);
+ g = alloc_disk_node(1 << PARTN_BITS,
+ pcibus_to_node(drive->hwif->pci_dev->bus));
Problem is that pci_dev may be NULL - and it is NULL for example with
kernel I've just built, with amd IDE driver built as a module while with
ide-disk built into the kernel.
I think that you probably want to guard your code by
'if (drive->hwif->pci_dev)', as besides my silly configuration mistake
also ISA devices have a chance to have pci_dev NULL. Not that there are
any such users if nobody hit it in the last 6 weeks...
I've just built amd IDE driver into the kernel, where it belongs anyway,
but just in case please apply this patch...
Thanks,
Petr Vandrovec
Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
--- linux-2.6.13-rc6-00dd.dist/drivers/ide/ide-disk.c 2005-08-09 13:14:26.000000000 +0200
+++ linux-2.6.13-rc6-00dd/drivers/ide/ide-disk.c 2005-08-09 15:11:51.000000000 +0200
@@ -1219,8 +1219,12 @@
if (!idkp)
goto failed;
- g = alloc_disk_node(1 << PARTN_BITS,
- pcibus_to_node(drive->hwif->pci_dev->bus));
+ if (drive->hwif->pci_dev) {
+ g = alloc_disk_node(1 << PARTN_BITS,
+ pcibus_to_node(drive->hwif->pci_dev->bus));
+ } else {
+ g = alloc_disk(1 << PARTN_BITS);
+ }
if (!g)
goto out_free_idkp;
next reply other threads:[~2005-08-09 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-09 13:27 Petr Vandrovec [this message]
2005-08-09 16:27 ` Christoph Lameter
[not found] ` <42F92A1F.9040901@vc.cvut.cz>
2005-08-10 2:59 ` Christoph Lameter
2005-08-10 8:05 ` Bartlomiej Zolnierkiewicz
2005-08-10 15:04 ` Alan Cox
2005-08-10 23:46 ` Christoph Lameter
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=20050809132725.GA20397@vana.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=christoph@lameter.com \
--cc=linux-kernel@vger.kernel.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®