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: <20160523213604.GB1253@raspberrypi.musicnaut.iki.fi>
Date:	Tue, 24 May 2016 00:36:04 +0300
From:	Aaro Koskinen <aaro.koskinen@....fi>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: __napi_alloc_skb failures locking up the box

Hi,

On Sat, Apr 30, 2016 at 12:54:12PM -0700, Eric Dumazet wrote:
> On Sat, 2016-04-30 at 22:24 +0300, Aaro Koskinen wrote:
> > Hi,
> > 
> > I have old NAS box (Thecus N2100) with 512 MB RAM, where rsync from NFS ->
> > disk reliably results in temporary out-of-memory conditions.
> > 
> > When this happens the dmesg gets flooded with below logs. If the serial
> > console logging is enabled, this will lock up the box completely and
> > the backup is not making any progress.
> > 
> > Shouldn't these allocation failures be ratelimited somehow (or even made
> > silent)? It doesn't sound right if I can lock up the system simply by
> > copying files...
> 
> Agreed.
> 
> All napi_alloc_skb() callers handle failure just fine.
> 
> If they did not, a NULL deref would produce a proper stack dump.
> 
> When memory gets this tight, other traces will be dumped anyway.
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 15d0df943466..0652709fe81a 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2423,7 +2423,7 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi,
>  static inline struct sk_buff *napi_alloc_skb(struct napi_struct *napi,
>  					     unsigned int length)
>  {
> -	return __napi_alloc_skb(napi, length, GFP_ATOMIC);
> +	return __napi_alloc_skb(napi, length, GFP_ATOMIC | __GFP_NOWARN);
>  }
>  void napi_consume_skb(struct sk_buff *skb, int budget);

Care to send this as a formal patch, so I can reply with my Tested-by?

A.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ