FAILED: patch "[PATCH] sunrpc: fix UDP memory accounting" failed to apply to 4.7-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 4.7-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
a41bd25ae67d3e4052c7f00ee9f2b4ba9219309eMon Sep 17 00:00:00 2001
From: Paolo Abeni <[email protected]>
Date: Thu, 25 Aug 2016 18:42:35 +0200
Subject: [PATCH] sunrpc: fix UDP memory accounting
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().
net/sunrpc/xprtsock.c +1 -1
@@ -1074,7 +1074,7 @@ static void xs_udp_data_receive(struct sock_xprt *transport) skb =skb_recv_datagram (sk,0 ,1 , &err);if (skb !=NULL ) {xs_udp_data_read_skb (&transport->xprt, sk, skb); -skb_free_datagram (sk, skb); +skb_free_datagram_locked (sk, skb);continue ; }if (!test_and_clear_bit (XPRT_SOCK_DATA_READY , &transport->sock_state))