public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Linus Torvalds <torvalds@osdl.org>,
	kiran@scalex86.org,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix ide-disk.c oops caused by hwif == NULL
Date: Wed, 10 Aug 2005 15:13:03 +0200	[thread overview]
Message-ID: <58cb370e050810061342fcd09a@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0508100604020.12126@schroedinger.engr.sgi.com>

NAK

hwif can't be NULL or something is *really* wrong

On 8/10/05, Christoph Lameter <clameter@engr.sgi.com> wrote:
> On Wed, 10 Aug 2005, Geert Uytterhoeven wrote:
> 
> > On Tue, 9 Aug 2005, Linux Kernel Mailing List wrote:
> > > tree 518f62158f0923573decb8f072ac7282fb7575cb
> > > parent aeb3f76350e78aba90653b563de6677b442d21d6
> > > author Christoph Lameter <christoph@lameter.com> Wed, 10 Aug 2005 09:59:21 -0700
> > > committer Linus Torvalds <torvalds@g5.osdl.org> Wed, 10 Aug 2005 10:21:31 -0700
> > >
> > > [PATCH] Fix ide-disk.c oops caused by hwif == NULL
> >
> > How can this patch fix that? It still dereferences hwif without checking for a
> > NULL pointer.
> 
> Correct. So we need to indeed go back to a version that does check for
> NULL that I initially proposed.
> 
> Index: linux-2.6/include/linux/ide.h
> ===================================================================
> --- linux-2.6.orig/include/linux/ide.h  2005-08-09 19:47:14.000000000 -0700
> +++ linux-2.6/include/linux/ide.h       2005-08-10 06:05:44.000000000 -0700
> @@ -1503,7 +1503,7 @@
> 
>  static inline int hwif_to_node(ide_hwif_t *hwif)
>  {
> -       if (hwif->pci_dev)
> +       if (hwif && hwif->pci_dev)
>                 return pcibus_to_node(hwif->pci_dev->bus);
>         else
>                 /* Add ways to determine the node of other busses here */

  reply	other threads:[~2005-08-10 13:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200508100459.j7A4xTn7016128@hera.kernel.org>
2005-08-10 11:11 ` [PATCH] Fix ide-disk.c oops caused by hwif == NULL Geert Uytterhoeven
2005-08-10 13:07   ` Christoph Lameter
2005-08-10 13:13     ` Bartlomiej Zolnierkiewicz [this message]
2005-08-10 13:28       ` Christoph Lameter
2005-08-10 14:59     ` Alan Cox
2005-08-11  2:18       ` 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=58cb370e050810061342fcd09a@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=clameter@engr.sgi.com \
    --cc=geert@linux-m68k.org \
    --cc=kiran@scalex86.org \
    --cc=linux-kernel@vger.kernel.org \
    --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