public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel•org>
To: Sven Eckelmann <sven@narfation•org>
Cc: "David S. Miller" <davem@davemloft•net>,
	Eric Dumazet <edumazet@google•com>,
	Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
	b.a.t.m.a.n@lists•open-mesh.org, netdev@vger•kernel.org,
	stable@vger•kernel.org,
	syzbot+f8812454d9b3ac00d282@syzkaller•appspotmail.com
Subject: Re: [PATCH net] batman-adv: Hold rtnl lock during MTU update via netlink
Date: Tue, 22 Aug 2023 09:55:39 +0200	[thread overview]
Message-ID: <20230822075539.GU2711035@kernel.org> (raw)
In-Reply-To: <20230821-batadv-missing-mtu-rtnl-lock-v1-1-1c5a7bfe861e@narfation.org>

On Mon, Aug 21, 2023 at 09:48:48PM +0200, Sven Eckelmann wrote:
> The automatic recalculation of the maximum allowed MTU is usually triggered
> by code sections which are already rtnl lock protected by callers outside
> of batman-adv. But when the fragmentation setting is changed via
> batman-adv's own batadv genl family, then the rtnl lock is not yet taken.
> 
> But dev_set_mtu requires that the caller holds the rtnl lock because it
> uses netdevice notifiers. And this code will then fail the check for this
> lock:
> 
>   RTNL: assertion failed at net/core/dev.c (1953)
> 
> Cc: stable@vger•kernel.org
> Reported-by: syzbot+f8812454d9b3ac00d282@syzkaller•appspotmail.com
> Fixes: c6a953cce8d0 ("batman-adv: Trigger events for auto adjusted MTU")
> Signed-off-by: Sven Eckelmann <sven@narfation•org>

Reviewed-by: Simon Horman <horms@kernel•org>

> ---
> This problem was just identified by syzbot [1]. I hope it is ok to directly
> send this patch to netdev instead of creating a single-patch PR from
> the batadv/net branch. If you still prefer a PR then we can also prepare
> it.
> 
> [1] https://lore.kernel.org/r/0000000000009bbb4b0603717cde@google.com

...

  reply	other threads:[~2023-08-22  7:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 19:48 [PATCH net] batman-adv: Hold rtnl lock during MTU update via netlink Sven Eckelmann
2023-08-22  7:55 ` Simon Horman [this message]
2023-08-23  0:30 ` patchwork-bot+netdevbpf

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=20230822075539.GU2711035@kernel.org \
    --to=horms@kernel$(echo .)org \
    --cc=b.a.t.m.a.n@lists$(echo .)open-mesh.org \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=stable@vger$(echo .)kernel.org \
    --cc=sven@narfation$(echo .)org \
    --cc=syzbot+f8812454d9b3ac00d282@syzkaller$(echo .)appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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