]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv4: Convert devinet_ioctl() to per-netns RTNL except for SIOCSIFFLAGS.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 21 Oct 2024 18:32:38 +0000 (11:32 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 29 Oct 2024 10:54:58 +0000 (11:54 +0100)
commit88d1f8770690791cbe5d8f60b17137df05476299
tree79fd8432e23d355eb3934169eb3ccaf51584b4e8
parent77453d428d4c9c613341de7f9b943f0c83f37a27
ipv4: Convert devinet_ioctl() to per-netns RTNL except for SIOCSIFFLAGS.

Basically, devinet_ioctl() operates on a single netns.

However, ioctl(SIOCSIFFLAGS) will trigger the netdev notifier
that could touch another netdev in different netns.

Let's use per-netns RTNL helper in devinet_ioctl() and place
ASSERT_RTNL() for SIOCSIFFLAGS.

We will remove ASSERT_RTNL() once RTM_SETLINK and RTM_DELLINK
are converted.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/devinet.c