From: Yiqi Sun <sunyiqixm@gmail.com>
To: jk@codeconstruct.com.au
Cc: davem@davemloft.net, edumazet@google.com, horms@kernel.org,
kuba@kernel.org, linux-kernel@vger.kernel.org,
matt@codeconstruct.com.au, netdev@vger.kernel.org,
pabeni@redhat.com, qwe.aldo@gmail.com, sunyiqixm@gmail.com
Subject: Re: Re: [PATCH] net: mctp: hold a reference to the route device in mctp_route_lookup()
Date: Mon, 17 Aug 2026 20:14:32 +0800 [thread overview]
Message-ID: <20260817121432.3586534-1-sunyiqixm@gmail.com> (raw)
In-Reply-To: <55cd94e61d68d95e9db16f21980a532f4edf70e1.camel@codeconstruct.com.au>
Hi Jeremy,
> Hi Aldo,
>
> > mctp_route_lookup() uses rt->dev without holding a reference on it.
>
> [...]
>
> > Take a reference with refcount_inc_not_zero() before touching rt->dev,
> > skip a device that is already dead, and drop the reference once the
> > destination has taken its own.
>
> This looks the same as Yiqi Sun's analysis:
>
> https://lore.kernel.org/netdev/20260731022926.913865-1-sunyiqixm@gmail.co=
> m/
>
> I had requested some simplifications for the proposed fix, which would
> likely result in something very close to your contribution here.
>
> Yiqi had not followed up from that review as yet, though; so if we don't
> see any updated patch shortly, then your implementation looks reasonable.
>
> Regards,
>
>
> Jeremy
Sorry for the delay. I haven't had a chance to send v2 yet.
I've reviewed Aldo's patch, and the approach looks good to me. It addresses
the same issue I was trying to fix, so I'm happy for Aldo's patch to
supersede mine.
Thanks for picking this up, Aldo, and thanks for the review, Jeremy.
Regards,
Yiqi
prev parent reply other threads:[~2026-08-17 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 2:21 [PATCH] net: mctp: hold a reference to the route device in mctp_route_lookup() Aldo Ariel Panzardo
2026-08-14 2:19 ` Jeremy Kerr
2026-08-17 12:14 ` Yiqi Sun [this message]
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=20260817121432.3586534-1-sunyiqixm@gmail.com \
--to=sunyiqixm@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qwe.aldo@gmail.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