From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Cc: "Li, Shaohua" <shaohua.li@intel.com>,
Robert Hancock <hancockr@shaw.ca>, Zan Lynx <zlynx@acm.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, "Raj, Ashok" <ashok.raj@intel.com>
Subject: Re: 2.6.22-rc6-mm1 Intel DMAR crash on AMD x86_64
Date: Fri, 29 Jun 2007 23:56:48 +0200 [thread overview]
Message-ID: <200706292356.49825.rjw@sisk.pl> (raw)
In-Reply-To: <20070629152858.GA27995@linux-os.sc.intel.com>
On Friday, 29 June 2007 17:28, Keshavamurthy, Anil S wrote:
> On Thu, Jun 28, 2007 at 06:14:27PM -0700, Li, Shaohua wrote:
> >
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-
> > >rc6/2.6.22-rc6-mm1/
> > >>
> > >>> +intel-iommu-dmar-detection-and-parsing-logic.patch
> [..]
> > >
> > >I took a picture of it, looks like the backtrace is:
> > >
> > >NULL pointer dereference at 024
> > >EIP:dmar_table_init+0x11
> > >intel_iommu_init+0x30
> > >pci_iommu_init+0xe
> > >kernel_init+0x16e
> > >
> > >Presumably something is NULL in dmar_table_init that wasn't expected to
> > >be.. I would guess it likely crashes on any system without an Intel
> > >IOMMU in it.
> Yup, that is correct.
>
> > How about something like below?
> >
> >
> > int __init dmar_table_init(void)
> > {
> > + if (!dmar_tbl)
> > + return -ENODEV;
> > parse_dmar_table();
> why not check for NULL in the function where it touched?
> Also when there are no DMAR devices we need the below
> printk on the console.
>
> > if (list_empty(&dmar_drhd_units)) {
> > printk(KERN_ERR PREFIX "No DMAR devices found\n");
> > return -ENODEV;
> > }
> > return 0;
> > }
>
> Here is the revised patch of the above.
> Andrew, please add this fix to
> +intel-iommu-dmar-detection-and-parsing-logic.patch
> ------------------------------------------------
>
> Check for dmar_tbl pointer as this can be NULL on
> systems with no Intel VT-d support.
>
> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
For the record, this patch fixes the boot crash on my AMD64-based test box.
Thanks,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-06-29 21:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.GKNLH/oj9PSCnQCxx9ZAggjc5uA@ifi.uio.no>
[not found] ` <fa.WYdi9Gj/0/XomcQpW4CEW5a4kKI@ifi.uio.no>
2007-06-29 0:58 ` 2.6.22-rc6-mm1 Intel DMAR crash on AMD x86_64 Robert Hancock
2007-06-29 1:14 ` Li, Shaohua
2007-06-29 15:28 ` Keshavamurthy, Anil S
2007-06-29 16:23 ` Muli Ben-Yehuda
2007-06-29 19:23 ` Keshavamurthy, Anil S
2007-06-29 21:18 ` Muli Ben-Yehuda
2007-06-30 19:50 ` Andi Kleen
2007-06-29 21:56 ` Rafael J. Wysocki [this message]
2007-07-14 7:22 ` 2.6.22-rc6-mm1 Robert Hancock
2007-07-14 9:07 ` 2.6.22-rc6-mm1 Andrew Morton
2007-07-14 18:23 ` 2.6.22-rc6-mm1 Thomas Gleixner
2007-06-28 10:43 2.6.22-rc6-mm1 Andrew Morton
2007-06-28 20:40 ` 2.6.22-rc6-mm1 Intel DMAR crash on AMD x86_64 Zan Lynx
2007-06-28 23:50 ` Zach Carter
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=200706292356.49825.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=ashok.raj@intel.com \
--cc=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
--cc=zlynx@acm.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