All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x
@ 2003-03-23 22:14 Martin J. Bligh
  2003-03-23 22:56 ` Andries Brouwer
  2003-03-24  0:15 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Martin J. Bligh @ 2003-03-23 22:14 UTC (permalink / raw)
  To: linux-kernel

http://bugme.osdl.org/show_bug.cgi?id=492

           Summary: Zip drive parallel-port driver causes segfault in 2.5.x
    Kernel Version: 2.5.x
            Status: NEW
          Severity: high
             Owner: andmike@us.ibm.com
         Submitter: wa1ter@myrealbox.com


Distribution:gentoo linux 1.4
Hardware Environment:soyo k7via/single Athlon mb
Software Environment:gcc3.2.2/module-init-tools 0.9.10-r4
Problem Description: ppa module doesn't work properly and, if compiled into
kernel it causes a kernel panic at boot.
Steps to reproduce:compile ppa.ko as a module and modprobe ppa:

Error messages include 'scheduling while atomic' and 'oops: 0004 [#2]'
and 'unable to handle kernel paging request' and 'modprobe exited with
preempt_count 1'.

This same problem has existed at least since kernel 2.5.49 when I
started trying the 2.5 series, and I suspect that ppa has never
worked with 2.5 kernels, but I don't know for sure.  The driver
works fine with 2.4 kernels.

Note:  it is NOT necessary to have a parallel Zip drive to test this
kernel module.  The ppa module should load without error even with no
Zip drive connected!



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

* Re: [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x
  2003-03-23 22:14 [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x Martin J. Bligh
@ 2003-03-23 22:56 ` Andries Brouwer
  2003-03-24  0:15 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andries Brouwer @ 2003-03-23 22:56 UTC (permalink / raw)
  To: LKML; +Cc: wa1ter, andmike

On Sun, Mar 23, 2003 at 02:14:54PM -0800, Martin J. Bligh wrote:
> http://bugme.osdl.org/show_bug.cgi?id=492
> 
>            Summary: Zip drive parallel-port driver causes segfault in 2.5.x
>     Kernel Version: 2.5.x
>             Status: NEW
>           Severity: high
>              Owner: andmike@us.ibm.com
>          Submitter: wa1ter@myrealbox.com
> 
> 
> Problem Description: ppa module doesn't work properly and, if compiled into
> kernel it causes a kernel panic at boot.
> Steps to reproduce:compile ppa.ko as a module and modprobe ppa:
> 
> Error messages include 'scheduling while atomic' and 'oops: 0004 [#2]'
> and 'unable to handle kernel paging request' and 'modprobe exited with
> preempt_count 1'.
> 
> This same problem has existed at least since kernel 2.5.49 when I
> started trying the 2.5 series, and I suspect that ppa has never
> worked with 2.5 kernels, but I don't know for sure.  The driver
> works fine with 2.4 kernels.
> 
> Note:  it is NOT necessary to have a parallel Zip drive to test this
> kernel module.  The ppa module should load without error even with no
> Zip drive connected!

Just compiled ppa and insmod'ed. No problems. [2.5.65, no such Zip drive]


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

* Re: [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x
  2003-03-23 22:14 [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x Martin J. Bligh
  2003-03-23 22:56 ` Andries Brouwer
@ 2003-03-24  0:15 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2003-03-24  0:15 UTC (permalink / raw)
  To: LKML; +Cc: wa1ter

"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> Problem Description: ppa module doesn't work properly and, if compiled into
> kernel it causes a kernel panic at boot.
> Steps to reproduce:compile ppa.ko as a module and modprobe ppa:

Null-pointer deref.  This fixes it for me, but I'm not sure why the detect
routing is returning with the host lock held.  Maybe scsi detect routines are
supposed to do that?

diff -puN drivers/scsi/ppa.c~ppa-null-pointer-fix drivers/scsi/ppa.c
--- 25/drivers/scsi/ppa.c~ppa-null-pointer-fix	2003-03-23 16:08:37.000000000 -0800
+++ 25-akpm/drivers/scsi/ppa.c	2003-03-23 16:09:14.000000000 -0800
@@ -219,13 +219,15 @@ int ppa_detect(Scsi_Host_Template * host
 	    printk("  supported by the imm (ZIP Plus) driver. If the\n");
 	    printk("  cable is marked with \"AutoDetect\", this is what has\n");
 	    printk("  happened.\n");
-	    spin_lock_irq(hreg->host_lock);
+	    if (hreg)	/* This is silly */
+		spin_lock_irq(hreg->host_lock);
 	    return 0;
 	}
 	try_again = 1;
 	goto retry_entry;
     } else {
-	spin_lock_irq(hreg->host_lock);
+	if (hreg)	/* And this should be unnecessary */
+		spin_lock_irq(hreg->host_lock);
 	return 1;		/* return number of hosts detected */
     }
 }

_


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

end of thread, other threads:[~2003-03-24  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-23 22:14 [Bug 492] New: Zip drive parallel-port driver causes segfault in 2.5.x Martin J. Bligh
2003-03-23 22:56 ` Andries Brouwer
2003-03-24  0:15 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.