mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net] ax25: fix incorrect dev_tracker usage
       [not found] <20220728051821.3160118-1-eric.dumazet@gmail.com>
@ 2022-07-29 17:32 ` Matthieu Baerts
  0 siblings, 0 replies; only message in thread
From: Matthieu Baerts @ 2022-07-29 17:32 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Eric Dumazet, Bernard F6BVP, Duoming Zhou, MPTCP Upstream

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

Hello,

On 28/07/2022 07:18, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> While investigating a separate rose issue [1], and enabling
> CONFIG_NET_DEV_REFCNT_TRACKER=y, Bernard reported an orthogonal ax25 issue [2]
> 
> An ax25_dev can be used by one (or many) struct ax25_cb.
> We thus need different dev_tracker, one per struct ax25_cb.
> 
> After this patch is applied, we are able to focus on rose.

FYI, we got a small conflict when merging -net in net-next in the MPTCP
tree due to this patch applied in -net:

  d7c4c9e075f8 ("ax25: fix incorrect dev_tracker usage")

and this one from net-next:

  d62607c3fe45 ("net: rename reference+tracking helpers")

The conflict has been resolved on our side[1] and the resolution we
suggest is attached to this email.

I'm sharing this thinking it can help others but if it only creates
noise, please tell me! :-)

Cheers,
Matt

[1] https://github.com/multipath-tcp/mptcp_net-next/commit/b01791aa6b6c
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

[-- Attachment #2: b01791aa6b6c783778b534f91997581a0e3caeb6.patch --]
[-- Type: text/x-patch, Size: 820 bytes --]

diff --cc net/ax25/af_ax25.c
index bbac3cb4dc99,5b5363c99ed5..d82a51e69386
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@@ -1066,7 -1065,7 +1066,7 @@@ static int ax25_release(struct socket *
  			del_timer_sync(&ax25->t3timer);
  			del_timer_sync(&ax25->idletimer);
  		}
- 		netdev_put(ax25_dev->dev, &ax25_dev->dev_tracker);
 -		dev_put_track(ax25_dev->dev, &ax25->dev_tracker);
++		netdev_put(ax25_dev->dev, &ax25->dev_tracker);
  		ax25_dev_put(ax25_dev);
  	}
  
@@@ -1147,7 -1146,7 +1147,7 @@@ static int ax25_bind(struct socket *soc
  
  	if (ax25_dev) {
  		ax25_fillin_cb(ax25, ax25_dev);
- 		netdev_hold(ax25_dev->dev, &ax25_dev->dev_tracker, GFP_ATOMIC);
 -		dev_hold_track(ax25_dev->dev, &ax25->dev_tracker, GFP_ATOMIC);
++		netdev_hold(ax25_dev->dev, &ax25->dev_tracker, GFP_ATOMIC);
  	}
  
  done:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-29 17:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220728051821.3160118-1-eric.dumazet@gmail.com>
2022-07-29 17:32 ` [PATCH net] ax25: fix incorrect dev_tracker usage Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).