Re: [PATCH V2 16/18] be2iscsi: Fix possible reentrancy issue in be_iopoll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-04-05 at 20:38 -0700, Jayamohan Kallickal wrote:
> From: Shlomo Pongratz <shlomop@xxxxxxxxxxxx>
> 
>  The driver creates "NAPI" context per core which is fine,
>  however the above routine declares the ret variable as static!
>  Thus there is only one instance of this variable!
>  When this routine is called from more than one thread of execution,
>  than the result is unpredictable.
> 
>          static unsigned int ret;
>          .....
> 
>          ret = beiscsi_process_cq(pbe_eq);
>                  <--------Another thread can enter here and change "ret".
>          if (ret < budget) {
>                 ....
>          }
>                  <--------Another thread can enter here and change "ret".
>          return ret;
> 
>  Fix - remove the "static"
> 
> Signed-off-by: Shlomo Pongratz <shlomop@xxxxxxxxxxxx>
> Acked-by: Jayamohan Kallickal <jayamohan.kallickal@xxxxxxxxxx>

The rule here is that this needs to be Signed-off-by: from you because
you sent the patch to me (signoffs follow the transmission path for the
patch).  If you just see the patch on the list and want me to apply it,
you give me an Acked-by, but if you actually pick the patch up and send
it to me it must have a signed-off-by.

I assumed your consent and changed the tag.

James

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux