lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 23 Apr 2008 14:47:42 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"Mark Salyzyn" <Mark_Salyzyn@...ptec.com>
Cc:	Linux-Scsi <linux-scsi@...r.kernel.org>,
	"James Bottomley" <James.Bottomley@...senpartnership.com>,
	linux-kernel@...r.kernel.org,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] aacraid: Fix down_interruptible() to check the return value take 2 (was: aacraid broken in git)

On Wed, Apr 23, 2008 at 5:16 AM, Mark Salyzyn <Mark_Salyzyn@...ptec.com> wrote:
> On Apr 21, 2008, at 8:42 PM, Yinghai Lu wrote:
>
>
> > bisected to:
> >
> > yhlu@...12-office-77-185:~/xx/xx/kernel/linux-2.6> git-bisect good
> > e6990c6448ca9359b6d4ad027c0a6efbf4379e64 is first bad commit
> > commit e6990c6448ca9359b6d4ad027c0a6efbf4379e64
> > Author: Mark Salyzyn <Mark_Salyzyn@...ptec.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@...ptec.com>
> >   Signed-off-by: James Bottomley <James.Bottomley@...senPartnership.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@...ptec.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists