All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dhowells@redhat.com
Cc: netdev@vger.kernel.org, linux-afs@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 0/7] rxrpc: Fix use of skb_cow_data()
Date: Fri, 30 Aug 2019 14:55:16 -0700 (PDT)	[thread overview]
Message-ID: <20190830.145516.687207471361740034.davem@davemloft.net> (raw)
In-Reply-To: <156708405310.26102.7954021163316252673.stgit@warthog.procyon.org.uk>

From: David Howells <dhowells@redhat.com>
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
> bang.
> 
> 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:
> 
> 	git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
> 	rxrpc-fixes-20190827

Pulled, thanks again.

  parent reply	other threads:[~2019-08-30 21:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190901065603.432-1-hdanton@sina.com>
2019-08-29 13:07 ` [PATCH net 0/7] rxrpc: Fix use of skb_cow_data() David Howells
2019-08-29 13:07   ` [PATCH net 1/7] rxrpc: Improve jumbo packet counting David Howells
2019-08-29 13:07   ` [PATCH net 2/7] rxrpc: Use info in skbuff instead of reparsing a jumbo packet David Howells
2019-08-29 13:07   ` [PATCH net 3/7] rxrpc: Pass the input handler's data skb reference to the Rx ring David Howells
2019-08-29 13:08   ` [PATCH net 4/7] rxrpc: Abstract out rxtx ring cleanup David Howells
2019-08-29 13:08   ` [PATCH net 5/7] rxrpc: Add a private skb flag to indicate transmission-phase skbs David Howells
2019-08-29 13:08   ` [PATCH net 6/7] rxrpc: Use the tx-phase skb flag to simplify tracing David Howells
2019-08-29 13:08   ` [PATCH net 7/7] rxrpc: Use skb_unshare() rather than skb_cow_data() David Howells
2019-08-30 21:55   ` David Miller [this message]
2019-09-01  7:11   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830.145516.687207471361740034.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.