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: <6d72e483-9bab-d43a-3e25-9cc207fad8ba@redhat.com>
Date:   Thu, 6 Dec 2018 17:57:10 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Li RongQing <lirongqing@...du.com>, netdev@...r.kernel.org
Subject: Re: [PATCH][net-next] tun: remove unnecessary check in
 tun_flow_update


On 2018/12/6 下午4:28, Li RongQing wrote:
> caller has guaranted that rxhash is not zero
>
> Signed-off-by: Li RongQing <lirongqing@...du.com>
> ---
>   drivers/net/tun.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index d0745dc81976..6760b86547df 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -529,10 +529,7 @@ static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
>   	unsigned long delay = tun->ageing_time;
>   	u16 queue_index = tfile->queue_index;
>   
> -	if (!rxhash)
> -		return;
> -	else
> -		head = &tun->flows[tun_hashfn(rxhash)];
> +	head = &tun->flows[tun_hashfn(rxhash)];
>   
>   	rcu_read_lock();
>   


Acked-by: Jason Wang <jasowang@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ