Re: [PATCH net 0/7] rxrpc: Fix use of skb_cow_data()
From: David Miller
Date: Fri Aug 30 2019 - 17:55:19 EST
From: David Howells <dhowells@xxxxxxxxxx>
Date: Thu, 29 Aug 2019 14:07:33 +0100
> Here's a series of patches that replaces the use of skb_cow_data() in rxrpc
> with skb_unshare() early on in the input process. The problem that is
> being seen is that skb_cow_data() indirectly requires that the maximum
> usage count on an sk_buff be 1, and it may generate an assertion failure in
> pskb_expand_head() if not.
> This can occur because rxrpc_input_data() may be still holding a ref when
> it has just attached the sk_buff to the rx ring and given that attachment
> its own ref. If recvmsg happens fast enough, skb_cow_data() can see the
> ref still held by the softirq handler.
> Further, a packet may contain multiple subpackets, each of which gets its
> own attachment to the ring and its own ref - also making skb_cow_data() go
> Fix this by:
> There are also patches to improve the rxrpc_skb tracepoint to make sure
> that Tx-derived buffers are identified separately from Rx-derived buffers
> in the trace.
This looks great, thanks for reimplementing this using skb_unshare().
> The patches are tagged here:
Pulled, thanks again.