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: <9ed913e1-2e2a-cf8d-4382-d9799e11a072@huawei.com>
Date: Fri, 18 Aug 2023 09:25:32 +0800
From: Ruan Jinjie <ruanjinjie@...wei.com>
To: Simon Horman <horms@...nel.org>
CC: <netdev@...r.kernel.org>, <linux@...linux.org.uk>, Horatiu Vultur
	<horatiu.vultur@...rochip.com>, <UNGLinuxDriver@...rochip.com>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Richard Cochran
	<richardcochran@...il.com>
Subject: Re: [PATCH net-next] net: lan966x: Fix return value check for
 vcap_get_rule()



On 2023/8/18 2:34, Simon Horman wrote:
> On Thu, Aug 17, 2023 at 08:37:26PM +0800, Ruan Jinjie wrote:
>> Since vcap_get_rule() return NULL or ERR_PTR(), just check NULL
>> is not correct. So use IS_ERR_OR_NULL() to fix the issue.
>>
>> Fixes: 72df3489fb10 ("net: lan966x: Add ptp trap rules")
>> Signed-off-by: Ruan Jinjie <ruanjinjie@...wei.com>
>> ---
>>  drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Hi Ruan Jinjie,
> 
> Could we consider updating vcap_get_rule() to always return an ERR_PTR()
> and update the error detection conditions to use IS_ERR()?
> It seems to me that would be somewhat cleaner in this case.

Sure, I'll try to do it. Thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ