From: Brian King <brking@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Boutcher <sleddog@us.ibm.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] ibmvscsi driver - next version
Date: Mon, 23 Feb 2004 14:52:50 -0600 [thread overview]
Message-ID: <403A6822.2040700@us.ibm.com> (raw)
In-Reply-To: 20040223144542.A9624@infradead.org
Christoph Hellwig wrote:
> + found_evt = NULL;
> + spin_lock_irqsave(&hostdata->lock, flags);
> + if(!list_empty(&hostdata->sent)) {
> + list_for_each_safe(pos, next, &hostdata->sent) {
> + tmp_evt = list_entry(pos, struct srp_event_struct, list);
> +
> + if (tmp_evt->cmnd == cmd) {
> + found_evt = tmp_evt;
> + break;
> + }
> + }
> + }
> + spin_unlock_irqrestore(&hostdata->lock, flags);
> +
> + /* If we can't find this event, just return false */
> + if (found_evt == NULL) {
> + printk(KERN_ERR "ibmvscsi: failed to abort command\n");
> + return FAILED;
> + }
>
> This can't ever happen. You will only get called for commands
> that you have accepted in queuecommand and not called the completion
> routine for.
I'm not sure I agree with this statement. Looking at scsi_error.c, it looks
to me like there is a race condition in that the midlayer decides whether or
not to abort an op, then grabs the host lock, then calls eh_abort. From the
time that the midlayer decides to abort an op and then grabs the host lock, the
op may have finished. The LLD should return SUCCESS in this scenario, however,
rather than FAILED.
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
next prev parent reply other threads:[~2004-02-23 20:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-23 4:24 [PATCH] ibmvscsi driver - next version Dave Boutcher
2004-02-23 14:45 ` Christoph Hellwig
2004-02-23 19:41 ` Dave Boutcher
2004-02-23 19:49 ` Christoph Hellwig
2004-02-23 20:52 ` Brian King [this message]
2004-02-23 21:08 ` Christoph Hellwig
2004-02-23 22:08 ` Mike Anderson
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=403A6822.2040700@us.ibm.com \
--to=brking@us.ibm.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sleddog@us.ibm.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