From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Subject: Re: [PATCH net] sunrpc: fix UDP memory accounting Date: Wed, 31 Aug 2016 13:45:51 +0200 Message-ID: <1472643951.4775.6.camel@redhat.com> References: <32a391a2469b4161dc2375c6b6374b8229b3dd37.1472126188.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Trond Myklebust , Anna Schumaker , "J. Bruce Fields" , Jeff Layton , "David S. Miller" , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jan Stancek To: Benjamin Coddington Return-path: In-Reply-To: Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Tue, 2016-08-30 at 12:28 -0400, Benjamin Coddington wrote: > On 25 Aug 2016, at 12:42, Paolo Abeni wrote: > > > The commit f9b2ee714c5c ("SUNRPC: Move UDP receive data path > > into a workqueue context"), as a side effect, moved the > > skb_free_datagram() call outside the scope of the related socket > > lock, but UDP sockets require such lock to be held for proper > > memory accounting. > > Fix it by replacing skb_free_datagram() with > > skb_free_datagram_locked(). > > > > Fixes: f9b2ee714c5c ("SUNRPC: Move UDP receive data path into a > > workqueue context") > > Reported-and-tested-by: Jan Stancek > > Signed-off-by: Paolo Abeni > > Thanks for finding this. A similar fix in 2009 for svcsock.c was done by > Eric Dumazet: > 9d410c796067 ("net: fix sk_forward_alloc corruption") > > skb_free_datagram_locked() is used for all xprt types in svcsock.c, > should we use > it for the xs_local_transport as well in xprtsock.c? AFAICS a similar fix is _not_ needed for xs_local_transport(), since it uses AF_LOCAL sockets and such family does not support protocol's memory accounting. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html