From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>
Cc: Joseph Glanville
<joseph.glanville-2MxvZkOi9dvvnOemgxGiVw@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
scst-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Kernel panic under 3.2.14 Xen dom0 and SCST trunk
Date: Fri, 03 Aug 2012 11:12:30 +0000 [thread overview]
Message-ID: <501BB21E.5060102@acm.org> (raw)
In-Reply-To: <1343938328.25205.17.camel-zHLflQxYYDO4Hhoo1DtQwJ9G+ZOsUmrO@public.gmane.org>
On 08/02/12 20:12, David Dillow wrote:
> On Thu, 2012-08-02 at 11:04 +0000, Bart Van Assche wrote:
>> On 07/24/12 15:43, Joseph Glanville wrote:
>>> [35404.804723] BUG: unable to handle kernel NULL pointer dereference at (null)
>>
>> I've been able to reproduce this ib_srp crash. Apparently if an SRP
>> response is received after srp_reset_host() has been invoked
>> srp_process_rsp() tries to call scmnd->scsi_done(scmnd) with scsi_done
>> == NULL, hence the kernel oops. A candidate fix is available in this
>> (rebased) tree: http://github.com/bvanassche/linux/tree/srp-ha.
>
> Hmm, I stopped looking at the thread when I noted the same points Roland
> did -- it looked like it was in the target rather than the initiator,
> and that ib_srp wasn't loaded (though it could have been built-in).
>
> I think I'm good with your fix, given a few minor changes:
> * rebase it to mainline (I tried it quickly, got conflicts that
> should be simple to resolve)
> * s/srp_remove_req/srp_claim_req/ as it doesn't remove the
> request. This isn't an issue you introduced; it should probably
> have been renamed some time ago.
> * in srp_remove_req(), the test for (scmnd && req->scmnd == scmnd)
> should probably be marked likely()
> * Similarly, the !scmnd test in srp_process_rsp() should be
> unlikely()
> * The reclamation of credits should be moved to srp_free_req(),
> since we could see the case where a credit is available without
> a corresponding request structure.
> * Get rid of the BUG_ON in srp_process_rsp(); in the past, I would
> have probably added it myself, but Andrew Morton called me on
> one I had tried to add, and he was right -- it doesn't add
> anything.
> * I wonder if srp_free_req() is the right name, but I think I'm
> deep in bike-shedding territory here.
>
> It'd be nice if we could avoid taking the lock twice in quick succession
> during normal operations, but that's something for later.
>
> We should get this into 3.6, and send it to stable as well. I can make
> the changes if you'd like, just let me know.
Hello Dave,
Thanks for the feedback. I'll update the patch according to your
feedback and move it to the start of the patch series such that the
patch applies fine on the stable trees.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-08-03 11:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 15:16 Kernel panic under 3.2.14 Xen dom0 and SCST trunk Joseph Glanville
2012-07-24 15:43 ` Joseph Glanville
[not found] ` <CAOzFzEjDHpTROUcKg9cOZkNSX1LnShSombgt26+VOptVdy5i-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-02 11:04 ` Bart Van Assche
[not found] ` <501A5EB0.4060904-HInyCGIudOg@public.gmane.org>
2012-08-02 15:45 ` Joseph Glanville
2012-08-02 20:12 ` David Dillow
[not found] ` <1343938328.25205.17.camel-zHLflQxYYDO4Hhoo1DtQwJ9G+ZOsUmrO@public.gmane.org>
2012-08-02 22:51 ` Joseph Glanville
2012-08-03 11:12 ` Bart Van Assche [this message]
2012-07-24 17:53 ` Bart Van Assche
[not found] ` <500EE108.2090605-HInyCGIudOg@public.gmane.org>
2012-07-24 19:50 ` Joseph Glanville
[not found] ` <CAOzFzEiiiEsUqLjRM-TFsVZhQyvQi=abX0ufS6obvuZxtWgB-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-24 19:52 ` Joseph Glanville
2012-07-24 19:59 ` Bart Van Assche
[not found] ` <500EFEB3.5020806-HInyCGIudOg@public.gmane.org>
2012-07-24 20:14 ` Joseph Glanville
[not found] ` <CAOzFzEi8rnbTyomWEByJL3J_7QnCJSj-yWhMdh8d5mHnBRLVzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-25 1:09 ` Joseph Glanville
2012-07-25 2:30 ` Roland Dreier
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=501BB21E.5060102@acm.org \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=dillowda-1Heg1YXhbW8@public.gmane.org \
--cc=joseph.glanville-2MxvZkOi9dvvnOemgxGiVw@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=scst-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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;
as well as URLs for NNTP newsgroup(s).