Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net v2 0/2] add support for skb with sk ref cloning
@ 2021-02-23  5:53 Oleksij Rempel
  2021-02-23  5:53 ` [PATCH net v2 1/2] skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid Oleksij Rempel
  2021-02-23  5:53 ` [PATCH net v2 2/2] can: fix ref count warning if socket was closed before skb was cloned Oleksij Rempel
  0 siblings, 2 replies; 4+ messages in thread
From: Oleksij Rempel @ 2021-02-23  5:53 UTC (permalink / raw)
  To: mkl, David S. Miller, Jakub Kicinski, Oliver Hartkopp,
	Robin van der Gracht, Johannes Berg
  Cc: Oleksij Rempel, kernel, linux-can, netdev, linux-kernel,
	Eric Dumazet, linux-wireless

changes v2:
- drop mac80211 patch for now, it can go separately if needed

Hello,

this series tries to fix a long standing problem in the CAN echo SKB
handling. The problem shows up if an echo SKB for a SKB that references
an already closed socket is created.

It looks like the mac80211/tx.c has the same problem, see RFC patch 3
for details.

regards,
Oleksij

Oleksij Rempel (2):
  skbuff: skb_clone_sk_optional(): add function to always clone a skb
    and increase refcount on sk if valid
  can: fix ref count warning if socket was closed before skb was cloned

 include/linux/can/skb.h   |  3 +--
 include/linux/skbuff.h    |  1 +
 net/can/af_can.c          |  6 +++---
 net/can/j1939/main.c      |  3 +--
 net/can/j1939/socket.c    |  3 +--
 net/can/j1939/transport.c |  4 +---
 net/core/skbuff.c         | 27 +++++++++++++++++++++++++++
 7 files changed, 35 insertions(+), 12 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  5:53 [PATCH net v2 0/2] add support for skb with sk ref cloning Oleksij Rempel
2021-02-23  5:53 ` [PATCH net v2 1/2] skbuff: skb_clone_sk_optional(): add function to always clone a skb and increase refcount on sk if valid Oleksij Rempel
2021-02-23  5:53 ` [PATCH net v2 2/2] can: fix ref count warning if socket was closed before skb was cloned Oleksij Rempel
2021-02-23  8:55   ` Eric Dumazet

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git