summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-09-07 21:01:04 +0300
committerJakub Kicinski <kuba@kernel.org>2023-09-07 21:19:36 +0300
commit6afcf0fb92701487421aa73c692855aa70fbc796 (patch)
tree79d6a84b13c1e6cb583f23ed15974e2593540f33 /include/linux
parent7153a404fb70d21097af3169354e1e5fda3fbb02 (diff)
downloadlinux-6afcf0fb92701487421aa73c692855aa70fbc796.tar.xz
Revert "net: team: do not use dynamic lockdep key"
This reverts commit 39285e124edbc752331e98ace37cc141a6a3747a. Looks like the change has unintended consequences in exposing objects before they are initialized. Let's drop this patch and try again in net-next. Reported-by: syzbot+44ae022028805f4600fc@syzkaller.appspotmail.com Fixes: 39285e124edb ("net: team: do not use dynamic lockdep key") Link: https://lore.kernel.org/all/20230907103124.6adb7256@kernel.org/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_team.h30
1 files changed, 1 insertions, 29 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 12d4447fc8ab..1b9b15a492fa 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -221,38 +221,10 @@ struct team {
atomic_t count_pending;
struct delayed_work dw;
} mcast_rejoin;
+ struct lock_class_key team_lock_key;
long mode_priv[TEAM_MODE_PRIV_LONGS];
};
-static inline void __team_lock(struct team *team)
-{
- mutex_lock(&team->lock);
-}
-
-static inline int team_trylock(struct team *team)
-{
- return mutex_trylock(&team->lock);
-}
-
-#ifdef CONFIG_LOCKDEP
-static inline void team_lock(struct team *team)
-{
- ASSERT_RTNL();
- mutex_lock_nested(&team->lock, team->dev->nested_level);
-}
-
-#else
-static inline void team_lock(struct team *team)
-{
- __team_lock(team);
-}
-#endif
-
-static inline void team_unlock(struct team *team)
-{
- mutex_unlock(&team->lock);
-}
-
static inline int team_dev_queue_xmit(struct team *team, struct team_port *port,
struct sk_buff *skb)
{