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: <1426801839.25985.15.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 19 Mar 2015 14:50:39 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	subashab@...eaurora.org
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: rps: fix data stall after hotplug

On Thu, 2015-03-19 at 19:54 +0000, subashab@...eaurora.org wrote:
> When RPS is enabled, IPI is triggered to enqueue the
> backlog NAPI to the poll list. If the CPU is hotplugged
> after the NAPI_STATE_SCHED bit is set on
> enqueue_to_backlog but before the IPI is delivered
> successfully, the poll list does not have the backlog
> NAPI queued. As a consequence of this, dev_cpu_callback
> does not clear the NAPI_STATE_SCHED bit on hotplug.
> Since NAPI_STATE_SCHED is set even after the cpu comes
> back up, packets get enqueued onto the input packet queue
> but are never processed since the IPI will not be triggered.
> 
> This patch handles this race by unconditionally resetting
> the NAPI state for the backlog NAPI on the offline CPU.
> 
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> ---
>  net/core/dev.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 6f561de..61d9579 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -7119,12 +7119,11 @@ static int dev_cpu_callback(struct notifier_block
> *nfb,
>  							    poll_list);
> 
>  		list_del_init(&napi->poll_list);
> -		if (napi->poll == process_backlog)
> -			napi->state = 0;
> -		else
> +		if (napi->poll != process_backlog)
>  			____napi_schedule(sd, napi);
>  	}
> 
> +	oldsd->backlog.state = 0;
>  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
>  	local_irq_enable();

Are you seeing this race on x86 ?

If IPI are not reliable on your arch, I am guessing you should fix them.

Otherwise, even without hotplug you'll have hangs.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ