mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>, Bernard F6BVP <f6bvp@free.fr>,
	Duoming Zhou <duoming@zju.edu.cn>,
	MPTCP Upstream <mptcp@lists.linux.dev>
Subject: Re: [PATCH net] ax25: fix incorrect dev_tracker usage
Date: Fri, 29 Jul 2022 19:32:26 +0200	[thread overview]
Message-ID: <ffa2ea4f-dba9-5e44-95cb-4f4d3470884c@tessares.net> (raw)
In-Reply-To: <20220728051821.3160118-1-eric.dumazet@gmail.com>

[-- 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:

           reply	other threads:[~2022-07-29 17:32 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220728051821.3160118-1-eric.dumazet@gmail.com>]

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=ffa2ea4f-dba9-5e44-95cb-4f4d3470884c@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=davem@davemloft.net \
    --cc=duoming@zju.edu.cn \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=f6bvp@free.fr \
    --cc=kuba@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 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).