Re: [SCSI] qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()

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

 



On Mon, 2017-08-14 at 10:38 -0500, Steve Magnani wrote:
> I've been porting patches from mainline into a copy of QLogic's target driver tree
> and ran across an anomaly in this changeset of yours from 2013
> (8c0eb596baa51f2b43949c698c644727ef17805c).
> 
> 
> The commit log says:
> 
>      ... Make it easy for Coverity (and for humans) to recognize that there is no
>      fcport leak in the error path by changing the
> 
>        bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN
> 
>      test into
> 
>        bsg_job->request->msgcode != FC_BSG_RPT_ELS.
> 
> 
> But the change actually made was this:
> 
> @@ -399,7 +399,7 @@ done_unmap_sg:
>   	goto done_free_fcport;
>   
>   done_free_fcport:
> -	if (bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN)
> +	if (bsg_job->request->msgcode == FC_BSG_RPT_ELS)
>   		kfree(fcport);
>   done:
>   	return rval;
> 
> 
> Shouldn't the "== FC_BSG_RPT_ELS" be "!= FC_BSG_RPT_ELS"?

Hello Steve,

Without having had a close look at the patch, I think you are right. On
http://www.spinics.net/lists/linux-scsi/msg66513.html one can see that
the change I had posted originally is as follows:

 done_free_fcport:
-	if (bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN)
+	if (bsg_job->request->msgcode != FC_BSG_RPT_ELS)
 		kfree(fcport);
 done:

I have not been able to find the reposted version of this patch so I can't
figure out anymore what went wrong ...

Bart.




[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