public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* sym53c8xx_2 oops in lk 2.5.69-bk14
@ 2003-05-21  4:12 Douglas Gilbert
  2003-05-21 16:19 ` Patrick Mansfield
  0 siblings, 1 reply; 3+ messages in thread
From: Douglas Gilbert @ 2003-05-21  4:12 UTC (permalink / raw)
  To: linux-scsi

This oops in the sym53c8xx may have been recently
introduced since I run rescan-scsi-bus.sh reasonably
often. It locked my system solid, scrolled the useful
part of the oops off the screen and put nothing in
the log. Handwritten notes:

....
scanning for device 1 0 0 0 ...
NEW: --------------[cut here]-----------
BUG at include/asm/spinlock.h:120
...
EIP is at sym53c8xx_timer+0xaa/0xc0
...
Call trace:
     sym53c8xx_timer
     sym53c8xx_timer
     run_timer_softirq
     scheduler_tick
     do_softirq
...
kernel panic: Fatal exception in interrupt

The kernel is built for SMP and running on a UP
box with all kernel debug options selected.
The LLD is stable otherwise.

Doug Gilbert


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

* Re: sym53c8xx_2 oops in lk 2.5.69-bk14
  2003-05-21  4:12 sym53c8xx_2 oops in lk 2.5.69-bk14 Douglas Gilbert
@ 2003-05-21 16:19 ` Patrick Mansfield
  2003-05-22  2:17   ` Douglas Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Mansfield @ 2003-05-21 16:19 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: linux-scsi

On Wed, May 21, 2003 at 02:12:49PM +1000, Douglas Gilbert wrote:
> This oops in the sym53c8xx may have been recently
> introduced since I run rescan-scsi-bus.sh reasonably
> often. It locked my system solid, scrolled the useful
> part of the oops off the screen and put nothing in
> the log. Handwritten notes:

The scsi_host_hn_get is not doing a scsi_host_get, so any scsi_host_put
that follows can break things - for example causing the scsi_host to
disappear out from under us. See the scsi_proc.c usage.

Christoph's "give ->proc_info a struct Scsi_Host * parameter" patch got
rid of a lot of them (and is in scsi-miscs-2.5), but not in scsi_proc.c.

Looks like scsi_host_hn_get should always call scsi_host_get, but
scsi_find_host_by_num really has to change to use driver model iterators
(so its locking protection matches scsi_host_get), I assume this is a WIP
for Christoph or Mike but for now you could use a patch like this
(untested, on top of scsi-misc-2.5 or Christoph's changes):

===== drivers/scsi/hosts.c 1.65 vs edited =====
--- 1.65/drivers/scsi/hosts.c	Thu May 15 06:08:47 2003
+++ edited/drivers/scsi/hosts.c	Fri May 23 10:24:10 2003
@@ -534,8 +534,12 @@
  **/
 struct Scsi_Host *scsi_host_hn_get(unsigned short host_no)
 {
-	/* XXX Inc ref count */
-	return scsi_find_host_by_num(host_no);
+	struct Scsi_Host *shost;
+
+	shost = scsi_find_host_by_num(host_no);
+	if (shost)
+		scsi_host_get(shost);
+	return shost;
 }
 
 /**

-- Patrick Mansfield

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

* Re: sym53c8xx_2 oops in lk 2.5.69-bk14
  2003-05-21 16:19 ` Patrick Mansfield
@ 2003-05-22  2:17   ` Douglas Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Douglas Gilbert @ 2003-05-22  2:17 UTC (permalink / raw)
  To: Patrick Mansfield; +Cc: linux-scsi

Patrick Mansfield wrote:
> On Wed, May 21, 2003 at 02:12:49PM +1000, Douglas Gilbert wrote:
> 
>>This oops in the sym53c8xx may have been recently
>>introduced since I run rescan-scsi-bus.sh reasonably
>>often. It locked my system solid, scrolled the useful
>>part of the oops off the screen and put nothing in
>>the log. Handwritten notes:
> 
> 
> The scsi_host_hn_get is not doing a scsi_host_get, so any scsi_host_put
> that follows can break things - for example causing the scsi_host to
> disappear out from under us. See the scsi_proc.c usage.
> 
> Christoph's "give ->proc_info a struct Scsi_Host * parameter" patch got
> rid of a lot of them (and is in scsi-miscs-2.5), but not in scsi_proc.c.
> 
> Looks like scsi_host_hn_get should always call scsi_host_get, but
> scsi_find_host_by_num really has to change to use driver model iterators
> (so its locking protection matches scsi_host_get), I assume this is a WIP
> for Christoph or Mike but for now you could use a patch like this
> (untested, on top of scsi-misc-2.5 or Christoph's changes):

Patrick,
Thanks, that patch fixed the problem I reported.

Doug Gilbert


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

end of thread, other threads:[~2003-05-22  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-21  4:12 sym53c8xx_2 oops in lk 2.5.69-bk14 Douglas Gilbert
2003-05-21 16:19 ` Patrick Mansfield
2003-05-22  2:17   ` Douglas Gilbert

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