public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Brosius <cobra@compuserve.com>
To: Andrew Morton <akpm@digeo.com>
Cc: dmo@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: DAC960 breakage, 2.5 bk current
Date: Sat, 17 May 2003 00:14:06 -0400	[thread overview]
Message-ID: <3EC5B70E.F7284909@compuserve.com> (raw)
In-Reply-To: 20030516204920.25b8e951.akpm@digeo.com

Andrew Morton wrote:
> 
> 
> Kevin Brosius <cobra@compuserve.com> wrote:
> >
> > kernel NULL pointer deref - virt 00000019
> >  Oops: 0000 [#1]
> >  CPU: 0
> >  EIP: 0060:[<c02774d3>]  Not tainted
> >  EFLAGS: 00010286
> >  EIP is at DAC960_ioctl+0x33/0x190
> >
> >  Process swapper (pid: 1, ...)
> >
> >  Call Trace:
> >  ] blkdev_ioctl+0xa5/0x466
> >  ] ioctl_by_dev+0x41/0x50
> 
> You tricking me.  That's "ioctl_by_bdev".  It passes in a null file*, and
> we have to handle it.

Yes, sorry.  Missed a letter in that typing.

> 
> Does this fix?

Yes, works great!  No further panic.  Thank you.

> 
> diff -puN drivers/block/DAC960.c~DAC960-oops-fix drivers/block/DAC960.c
> --- 25/drivers/block/DAC960.c~DAC960-oops-fix   2003-05-16 20:44:52.000000000 -0700
> +++ 25-akpm/drivers/block/DAC960.c      2003-05-16 20:45:16.000000000 -0700
> @@ -102,7 +102,7 @@ static int DAC960_ioctl(struct inode *in
>         int drive_nr = (int)disk->private_data;
>         struct hd_geometry g, *loc = (struct hd_geometry *)arg;
> 
> -       if (file->f_flags & O_NONBLOCK)
> +       if (file && file->f_flags & O_NONBLOCK)
>                 return DAC960_UserIOCTL(inode, file, cmd, arg);
> 
>         if (cmd != HDIO_GETGEO || !loc)
> 
> _

-- 
Kevin

  reply	other threads:[~2003-05-17  4:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-17  3:32 DAC960 breakage, 2.5 bk current Kevin Brosius
2003-05-17  3:49 ` Andrew Morton
2003-05-17  4:14   ` Kevin Brosius [this message]
2003-05-19 23:35     ` Dave Olien

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=3EC5B70E.F7284909@compuserve.com \
    --to=cobra@compuserve.com \
    --cc=akpm@digeo.com \
    --cc=dmo@osdl.org \
    --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