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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Jul 2020 10:11:38 +0800
From:   Jing Xiangfeng <jingxiangfeng@...wei.com>
To:     Markus Elfring <Markus.Elfring@....de>,
        <linux-scsi@...r.kernel.org>
CC:     <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Hannes Reinecke" <hare@...e.de>,
        "James E. J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Neerav Parikh <Neerav.Parikh@...el.com>,
        Robert Love <robert.w.love@...el.com>
Subject: Re: [PATCH] scsi: fcoe: add missed kfree() in an error path



On 2020/7/7 19:38, Markus Elfring wrote:
>> fcoe_fdmi_info() misses to call kfree() in an error path.
>> Add the missed function call to fix it.
>
> I suggest to use an additional jump target for the completion
> of the desired exception handling.
>
>
> …
>> +++ b/drivers/scsi/fcoe/fcoe.c
>> @@ -830,6 +830,7 @@ static void fcoe_fdmi_info(struct fc_lport *lport, struct net_device *netdev)
>>   		if (rc) {
>>   			printk(KERN_INFO "fcoe: Failed to retrieve FDMI "
>>   					"information from netdev.\n");
>> +			kfree(fdmi);
>>   			return;
>>   		}
>
> -			return;
> +			goto free_fdmi;
>
>
> How do you think about to apply any further coding style adjustments?

The local variable "fdmi" is invisible to the function.
See fcoe_fdmi_info().

	Thanks
>
> Regards,
> Markus
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ