From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Cc: Linux-Scsi <linux-scsi@vger.kernel.org>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] aacraid: Fix down_interruptible() to check the return value take 2 (was: aacraid broken in git)
Date: Wed, 23 Apr 2008 14:47:42 -0700 [thread overview]
Message-ID: <86802c440804231447x4e809c0cl5ca995db79e6075d@mail.gmail.com> (raw)
In-Reply-To: <BCC76E6D-9A0F-4DC1-822A-50EE44A52890@adaptec.com>
On Wed, Apr 23, 2008 at 5:16 AM, Mark Salyzyn <Mark_Salyzyn@adaptec.com> wrote:
> On Apr 21, 2008, at 8:42 PM, Yinghai Lu wrote:
>
>
> > bisected to:
> >
> > yhlu@mpk12-office-77-185:~/xx/xx/kernel/linux-2.6> git-bisect good
> > e6990c6448ca9359b6d4ad027c0a6efbf4379e64 is first bad commit
> > commit e6990c6448ca9359b6d4ad027c0a6efbf4379e64
> > Author: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
> > Date: Mon Apr 14 14:20:16 2008 -0400
> >
> > [SCSI] aacraid: Fix down_interruptible() to check the return value
> >
> > Instead of ignoring the return value in aac_fib_send() return 2 to
> > indicate to the layers above that fib transmission was aborted due to
> > timeout.
> >
> > Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
> > Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> >
> > :040000 040000 2f23bf33d76d6f37c558251003f88537c6e639fe
> > 63d59091ca7ac527b5106540eea06d7b6649862d M drivers
> >
>
>
> The return value for down_interruptible was incorrectly checked! updated
> patch enclosed.
>
> This attached patch is against current scsi-misc-2.6 (minus original
> down_interruptible patch).
>
> ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
> handling of patch attachments (inline gets damaged, please use attachment).
>
> Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
>
> drivers/scsi/aacraid/commsup.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff -ru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
> --- a/drivers/scsi/aacraid/commsup.c 2008-04-14 14:08:00.737201138 -0400
> +++ b/drivers/scsi/aacraid/commsup.c 2008-04-14 14:09:34.019252960 -0400
> @@ -515,10 +515,12 @@
> }
> udelay(5);
> }
> - } else
> - (void)down_interruptible(&fibptr->event_wait);
> + } else if (down_interruptible(&fibptr->event_wait)) {
> + fibptr->done = 2;
> + up(&fibptr->event_wait);
> + }
> spin_lock_irqsave(&fibptr->event_lock, flags);
> - if (fibptr->done == 0) {
> + if ((fibptr->done == 0) || (fibptr->done == 2)) {
> fibptr->done = 2; /* Tell interrupt we aborted */
> spin_unlock_irqrestore(&fibptr->event_lock, flags);
> return -EINTR;
>
it works.
Thanks
YH
next prev parent reply other threads:[~2008-04-23 21:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-19 1:55 aacraid broken in git Yinghai Lu
2008-04-19 12:33 ` Mark Salyzyn
2008-04-19 20:56 ` Yinghai Lu
2008-04-22 0:42 ` Yinghai Lu
2008-04-23 12:16 ` [PATCH] aacraid: Fix down_interruptible() to check the return value take 2 (was: aacraid broken in git) Mark Salyzyn
2008-04-23 21:47 ` Yinghai Lu [this message]
2008-04-30 19:28 ` [PATCH] aacraid: Fix warning about macro side-effects Mark Salyzyn
2008-04-30 19:47 ` [PATCH] aacraid: Fix jbod operations scan issues Mark Salyzyn
2008-04-30 20:03 ` [PATCH] aacraid: Add Power Management support Mark Salyzyn
2008-05-07 19:24 ` [PATCH] aacraid: Add Power Management cards to documentation Mark Salyzyn
2008-05-28 19:32 ` [PATCH] aacraid: prevent copy_from_user() BUG! Mark Salyzyn
2008-06-05 15:35 ` James Bottomley
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=86802c440804231447x4e809c0cl5ca995db79e6075d@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=Mark_Salyzyn@adaptec.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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).