All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] scsi: aacraid: Include HBA direct interface
@ 2017-02-13 18:41 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-02-13 18:41 UTC (permalink / raw)
  To: RaghavaAditya.Renukunta; +Cc: linux-scsi

Hello Raghava Aditya Renukunta,

The patch 423400e64d37: "scsi: aacraid: Include HBA direct interface"
from Feb 2, 2017, leads to the following static checker warning:

	drivers/scsi/aacraid/commsup.c:762 aac_hba_send()
	error: double unlock 'sem:&fibptr->event_wait'

drivers/scsi/aacraid/commsup.c
   757          if (wait) {
   758                  spin_unlock_irqrestore(&fibptr->event_lock, flags);
   759                  /* Only set for first known interruptable command */

This comment just confuses me...  What is a "known interruptable command?"

   760                  if (down_interruptible(&fibptr->event_wait)) {

down_interruptible() return -EINTR on failure so this test looks
reversed.  It should probably be:

			if (!down_interruptible(&fibptr->event_wait)) {


   761                          fibptr->done = 2;
   762                          up(&fibptr->event_wait);
   763                  }
   764                  spin_lock_irqsave(&fibptr->event_lock, flags);
   765                  if ((fibptr->done == 0) || (fibptr->done == 2)) {
   766                          fibptr->done = 2; /* Tell interrupt we aborted */
   767                          spin_unlock_irqrestore(&fibptr->event_lock, flags);
   768                          return -ERESTARTSYS;
   769                  }
   770                  spin_unlock_irqrestore(&fibptr->event_lock, flags);
   771                  WARN_ON(fibptr->done == 0);
   772  
   773                  if (unlikely(fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT))
   774                          return -ETIMEDOUT;
   775  
   776                  return 0;
   777          }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-13 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 18:41 [bug report] scsi: aacraid: Include HBA direct interface Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.