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: <40ec5737-8015-0a51-5ef5-2f4cce414500@gmail.com>
Date:   Fri, 18 Jan 2019 09:14:59 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Dave McKay <mckay.david@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: core: dev: Initialise napi state correctly



On 01/18/2019 04:46 AM, Dave McKay wrote:
> The state member of the napi_struct is not initialised correctly, it
> sets the SCHED bit without initialising the state to zero first. This
> results in peculiar behaviour if the original napi_struct didn't come
> from a zero initialised region to start with.
> 
> This patch just sets it directly using the appropriate bitfield
> constant.
> 
> Signed-off-by: Dave McKay <mckay.david@...il.com>
> ---
>  net/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 82f20022259d..250f97bf1973 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6276,7 +6276,7 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
>  #ifdef CONFIG_NETPOLL
>  	napi->poll_owner = -1;
>  #endif
> -	set_bit(NAPI_STATE_SCHED, &napi->state);
> +	napi->state = NAPIF_STATE_SCHED;
>  	napi_hash_add(napi);
>  }
>  EXPORT_SYMBOL(netif_napi_add);
> 

I am curious, which driver has exhibit any issue with current code ?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ