public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* DAC960 breakage, 2.5 bk current
@ 2003-05-17  3:32 Kevin Brosius
  2003-05-17  3:49 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Brosius @ 2003-05-17  3:32 UTC (permalink / raw)
  To: Dave Olien, akpm; +Cc: kernel

The change that went into 2.5.69 for DAC960 seems to break it here.

(http://marc.theaimsgroup.com/?l=linux-kernel&m=105209603501299&w=2)

I backed out the last two changesets in DAC960.c, and the driver runs
again.  Backing out only:
 ChangeSet 1.1132 2003/05/15 09:01:05 akpm@digeo.com
  [PATCH] DAC960 typedef cleanup patch

Did not resolve the panic, however backing out:
ChangeSet 1.1042.94.9 2003/04/30 07:31:56 akpm@digeo.com
  [PATCH] DAC960 patch to entry points with a new fix

Seems to resolve the problem.

The problem was, (copied by hand, please let me know if I've omitted a
critical field.):

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
] isofs_get_last_session+0xb4/0xe0
] set_blocksize+
] sb_set_blocksize+
] isofs_fill_super+
] sb_set_blocksize+
] get_sb_bdev+
] isofs_get_sb+
] isofs_fill_super+
] do_kern_mount+
] do_add_mount+
] do_mount+
] copy_mount_options+
] sys_mount+
] do_mount_root+
] mount_block_root+
] mount_root+
] prepare_namespace+
] init_workqueues+
] init+0x5f/0x200
] init+0x0/0x200
] kernel_thread_helper+0x5/0x10

Code: f6 43 19 08 0f 85 33 01 00 00 81 ff 01 03 00 00 74 12 ba ea
 <0>kernel panic: Attempted to kill init!


This is on a SuSE 8.1, dual Athlon MP system, gcc 3.2, binutils
2.12.90.0.15-40.  Please let me know if additional detail is helpful.

-- 
Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DAC960 breakage, 2.5 bk current
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2003-05-17  3:49 UTC (permalink / raw)
  To: Kevin Brosius; +Cc: dmo, linux-kernel

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.

Does this fix?

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)

_


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DAC960 breakage, 2.5 bk current
  2003-05-17  3:49 ` Andrew Morton
@ 2003-05-17  4:14   ` Kevin Brosius
  2003-05-19 23:35     ` Dave Olien
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Brosius @ 2003-05-17  4:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: dmo, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DAC960 breakage, 2.5 bk current
  2003-05-17  4:14   ` Kevin Brosius
@ 2003-05-19 23:35     ` Dave Olien
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Olien @ 2003-05-19 23:35 UTC (permalink / raw)
  To: Kevin Brosius; +Cc: Andrew Morton, linux-kernel


I apologize for missing this before submitting that patch.
I'm working on a patch that eliminates this O_NONBLOCK nonsense entirely.
I'm away from work most of this week though. Back next week.

On Sat, May 17, 2003 at 12:14:06AM -0400, Kevin Brosius wrote:
> 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
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-19 23:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-05-19 23:35     ` Dave Olien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox