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: <20200409180831.GB21666@kudzu.us>
Date:   Thu, 9 Apr 2020 14:08:32 -0400
From:   Jon Mason <jdmason@...zu.us>
To:     Jiasen Lin <linjiasen@...on.cn>
Cc:     linux-kernel@...r.kernel.org, linux-ntb@...glegroups.com,
        dan.carpenter@...cle.com, allenbh@...il.com, dave.jiang@...el.com,
        zhangpanyong@...on.cn
Subject: Re: [PATCH] NTB: Fix static check warning in perf_clear_test

On Thu, Apr 09, 2020 at 12:11:24AM -0700, Jiasen Lin wrote:
> As pthr->dma_chan can't be NULL in this context, so there is
> no need to check pthr->dma_chan.
> 
> Fixes: 99a06056124d ("NTB: ntb_perf: Fix address err in perf_copy_chunk")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Jiasen Lin <linjiasen@...on.cn>

Pulled into my ntb branch.

Thanks,
Jon

> ---
>  drivers/ntb/test/ntb_perf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index 972f6d9..f73b126 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -1010,8 +1010,8 @@ static void perf_clear_test(struct perf_thread *pthr)
>  				   pthr->perf->test_peer->dma_dst_addr,
>  				   pthr->perf->test_peer->outbuf_size,
>  				   DMA_FROM_DEVICE, 0);
> -	if (pthr->dma_chan)
> -		dma_release_channel(pthr->dma_chan);
> +
> +	dma_release_channel(pthr->dma_chan);
>  
>  no_dma_notify:
>  	atomic_dec(&perf->tsync);
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-ntb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+unsubscribe@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/1586416284-3246-1-git-send-email-linjiasen%40hygon.cn.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ