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]
Message-ID: <ZN5oUpbbRWie9676@vergenet.net>
Date: Thu, 17 Aug 2023 20:34:58 +0200
From: Simon Horman <horms@...nel.org>
To: Ruan Jinjie <ruanjinjie@...wei.com>
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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ