1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-17 03:50:37 +00:00
Kuniyuki Iwashima e833eb2516 mpls: Protect net->mpls.platform_label with a per-netns mutex.
MPLS (re)uses RTNL to protect net->mpls.platform_label,
but the lock does not need to be RTNL at all.

Let's protect net->mpls.platform_label with a dedicated
per-netns mutex.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20251029173344.2934622-13-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-03 17:40:53 -08:00

25 lines
427 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* mpls in net namespaces
*/
#ifndef __NETNS_MPLS_H__
#define __NETNS_MPLS_H__
#include <linux/types.h>
struct mpls_route;
struct ctl_table_header;
struct netns_mpls {
int ip_ttl_propagate;
int default_ttl;
size_t platform_labels;
struct mpls_route __rcu * __rcu *platform_label;
struct mutex platform_mutex;
struct ctl_table_header *ctl;
};
#endif /* __NETNS_MPLS_H__ */