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]
Message-ID: <cb42d735-e540-2ea4-2cd2-fc3e1bccd526@huawei.com>
Date:   Mon, 24 May 2021 09:07:40 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     Andrew Lunn <andrew@...n.ch>,
        Christophe Leroy <christophe.leroy@...roup.eu>
CC:     <linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
        <netdev@...r.kernel.org>, <rasmus.villemoes@...vas.dk>,
        <kuba@...nel.org>, <davem@...emloft.net>, <leoyang.li@....com>
Subject: Re: [PATCH net-next] ethernet: ucc_geth: Use kmemdup() rather than
 kmalloc+memcpy

On 2021/5/23 22:26, Andrew Lunn wrote:
> On Sun, May 23, 2021 at 03:29:37PM +0200, Christophe Leroy wrote:
>> YueHaibing <yuehaibing@...wei.com> a écrit :
>>
>>> Issue identified with Coccinelle.
>>>
>>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
>>> ---
>>>  drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
>>> b/drivers/net/ethernet/freescale/ucc_geth.c
>>> index e0936510fa34..51206272cc25 100644
>>> --- a/drivers/net/ethernet/freescale/ucc_geth.c
>>> +++ b/drivers/net/ethernet/freescale/ucc_geth.c
>>> @@ -3590,10 +3590,10 @@ static int ucc_geth_probe(struct
>>> platform_device* ofdev)
>>>  	if ((ucc_num < 0) || (ucc_num > 7))
>>>  		return -ENODEV;
>>>
>>> -	ug_info = kmalloc(sizeof(*ug_info), GFP_KERNEL);
>>> +	ug_info = kmemdup(&ugeth_primary_info, sizeof(*ug_info),
>>> +			  GFP_KERNEL);
>>
>> Can you keep that as a single line ? The tolerance is 100 chars per line now.
> 
> Networking prefers 80. If it fits a single 80 char line, please use a single line.
> Otherwise please leave it as it is.

Ok, will send v2.
> 
> 	   Andrew
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ