From: <subash.a.kasiviswanathan@oss.qualcomm.com>
To: "'Runyu Xiao'" <runyu.xiao@seu.edu.cn>,
<sean.tranchetti@oss.qualcomm.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jianhao.xu@seu.edu.cn>
Subject: RE: [PATCH net-next] net: rmnet: annotate endpoint lookup under RTNL
Date: Mon, 6 Jul 2026 00:31:13 -0600 [thread overview]
Message-ID: <000001dd0d11$0be0cd30$23a26790$@oss.qualcomm.com> (raw)
In-Reply-To: <20260701124017.3205729-1-runyu.xiao@seu.edu.cn>
> -----Original Message-----
> From: Runyu Xiao <runyu.xiao@seu.edu.cn>
> Sent: Wednesday, July 1, 2026 6:40 AM
> To: subash.a.kasiviswanathan@oss.qualcomm.com;
> sean.tranchetti@oss.qualcomm.com
> Cc: andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> runyu.xiao@seu.edu.cn; jianhao.xu@seu.edu.cn
> Subject: [PATCH net-next] net: rmnet: annotate endpoint lookup under RTNL
>
> rmnet_get_endpoint() is shared by packet receive paths and RTNL-protected
> control paths. The receive paths already run under RCU/BH context through
> the RX handler, while the control paths reach
> rmnet_get_endpoint() after obtaining the rmnet port with
> rmnet_get_port_rtnl().
>
> The helper walks port->muxed_ep[] with hlist_for_each_entry_rcu(). Pass
> lockdep_rtnl_is_held() as the non-RCU protection condition so
> CONFIG_PROVE_RCU_LIST can see the RTNL-protected control-path calls
> while preserving the existing RCU-reader behavior for data paths.
>
> This was found by our static analysis tool and then manually reviewed
against
> the current tree. The dynamic triage evidence is a target-matched
> CONFIG_PROVE_RCU_LIST warning; the change is limited to documenting the
> existing protection contract.
>
> This is a lockdep annotation cleanup. It does not change endpoint lifetime
or
> hash updates.
>
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> ---
> drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
> b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
> index ba8763cac9d9..977fb80d8bf8 100644
> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
> @@ -423,7 +423,8 @@ struct rmnet_endpoint *rmnet_get_endpoint(struct
> rmnet_port *port, u8 mux_id) {
> struct rmnet_endpoint *ep;
>
> - hlist_for_each_entry_rcu(ep, &port->muxed_ep[mux_id], hlnode) {
> + hlist_for_each_entry_rcu(ep, &port->muxed_ep[mux_id], hlnode,
> + lockdep_rtnl_is_held()) {
> if (ep->mux_id == mux_id)
> return ep;
> }
> --
> 2.34.1
Reviewed-by: Subash Abhinov Kasiviswanathan
<subash.a.kasiviswanathan@oss.qualcomm.com>
prev parent reply other threads:[~2026-07-06 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 12:40 [PATCH net-next] net: rmnet: annotate endpoint lookup under RTNL Runyu Xiao
2026-07-06 6:31 ` subash.a.kasiviswanathan [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='000001dd0d11$0be0cd30$23a26790$@oss.qualcomm.com' \
--to=subash.a.kasiviswanathan@oss.qualcomm.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=sean.tranchetti@oss.qualcomm.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