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: <6b4c0c8f-8d3a-4e10-840f-7f2fa1bc8800@linux.dev>
Date: Thu, 6 Mar 2025 10:28:19 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Ivan Abramov <i.abramov@...integration.ru>,
 Richard Cochran <richardcochran@...il.com>
Cc: Jonathan Lemon <jonathan.lemon@...il.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 lvc-project@...uxtesting.org
Subject: Re: [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show

On 05/03/2025 09:25, Ivan Abramov wrote:
> In the function _signal_summary_show(), there is a NULL-check for
> &bp->signal[nr], which cannot actually be NULL.
> 
> Therefore, this redundant check can be removed.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Ivan Abramov <i.abramov@...integration.ru>
> ---
>   drivers/ptp/ptp_ocp.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index b651087f426f..34c616bd0a02 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -3959,9 +3959,6 @@ _signal_summary_show(struct seq_file *s, struct ptp_ocp *bp, int nr)
>   	bool on;
>   	u32 val;
>   
> -	if (!signal)
> -		return;
> -
>   	on = signal->running;
>   	sprintf(label, "GEN%d", nr + 1);
>   	seq_printf(s, "%7s: %s, period:%llu duty:%d%% phase:%llu pol:%d",

Thanks,

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ