rxrpc: Fix skbuff cleanup of call's recvmsg_queue and rx_oos_queue
authorDavid Howells <dhowells@redhat.com>
Fri, 5 Jan 2024 17:05:41 +0000 (17:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:30 +0000 (15:35 -0800)
commit2968901d72b9cf0f57376cfd46e2712beb6d482b
treeeac04758d54a54b838d2a523e1cf89fe1af98d26
parent04c1f0f2505a32bc6a4aac1065e21e5384352b4f
rxrpc: Fix skbuff cleanup of call's recvmsg_queue and rx_oos_queue

[ Upstream commit 4fc68c4c1a114ba597b4f3b082f04622dfa0e0f6 ]

Fix rxrpc_cleanup_ring() to use rxrpc_purge_queue() rather than
skb_queue_purge() so that the count of outstanding skbuffs is correctly
updated when a failed call is cleaned up.

Without this rmmod may hang waiting for rxrpc_n_rx_skbs to become zero.

Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring")
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rxrpc/call_object.c