public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Stefan Bader <stefan.bader@canonical.com>
Cc: linux-scsi@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matthew Wilcox <matthew@wil.cx>
Subject: Re: Kernel oops in sym_int_sir
Date: Thu, 03 May 2012 17:05:02 +0200	[thread overview]
Message-ID: <4FA29E9E.8090401@suse.de> (raw)
In-Reply-To: <4FA143BC.2010702@canonical.com>

On 05/02/2012 04:25 PM, Stefan Bader wrote:
> While looking at a bug report [1] I found that the immediate cause of the crash
> was in that specific case the reference cp->cmd for a printk:
> 
> /*
>   * The device didn't switch to MSG IN phase after
>   * having reselected the initiator.
>   */
>  case SIR_RESEL_NO_MSG_IN:
>          scmd_printk(KERN_WARNING, cp->cmd,
>                          "No MSG IN phase after reselection\n");
>          goto out_stuck;
> 
> Unfortunately cp (that is returned by sym_ccb_from_dsa()) is NULL. This probably
> is as old as 2.6.24 when this patch added the scmd_printk:
> 
> commit 3fb364e089e05c35ead55a08d56d3004193681f6
> Author: Matthew Wilcox <matthew@wil.cx>
> Date: Fri Oct 5 15:55:10 2007 -0400
> 
>     [SCSI] sym53c8xx: Use scmd_printk where appropriate
> 
> A quick research looks like it might be other cases where this happened[2].
> Maybe more often (or solely?) when running in a VM (KVM). I even found some post
> that looks like it tries to fix just this problem[3].
> 
> However without more knowledge about that driver it could also be a problem in
> the hardware emulation so that normally cp == NULL should never happen. Or it
> might be that the emulation is just running sufficiently "different" to cause
> races to happen which never would be observed on real hardware.
> 
> Would [3] still make sense?
> 
cp->cmd == NULL would point to a race with SCSI command completion,
basically the same issue USB is facing right now.
So yes, it can happen (as you've seen), so I would got for [3].
And if only to avoid the Oops and figure out what _really_ went
wrong here.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

      reply	other threads:[~2012-05-03 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 14:25 Kernel oops in sym_int_sir Stefan Bader
2012-05-03 15:05 ` Hannes Reinecke [this message]

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=4FA29E9E.8090401@suse.de \
    --to=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=stefan.bader@canonical.com \
    /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