Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'batadv-net-pullrequest-20260225' of https://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here is a batman-adv bugfix:

- Avoid double-rtnl_lock ELP metric worker, by Sven Eckelmann

* tag 'batadv-net-pullrequest-20260225' of https://git.open-mesh.org/linux-merge:
batman-adv: Avoid double-rtnl_lock ELP metric worker
====================

Link: https://patch.msgid.link/20260225084614.229077-1-sw@simonwunderlich.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+14 -5
+9 -1
net/batman-adv/bat_v_elp.c
··· 111 111 /* unsupported WiFi driver version */ 112 112 goto default_throughput; 113 113 114 - real_netdev = batadv_get_real_netdev(hard_iface->net_dev); 114 + /* only use rtnl_trylock because the elp worker will be cancelled while 115 + * the rntl_lock is held. the cancel_delayed_work_sync() would otherwise 116 + * wait forever when the elp work_item was started and it is then also 117 + * trying to rtnl_lock 118 + */ 119 + if (!rtnl_trylock()) 120 + return false; 121 + real_netdev = __batadv_get_real_netdev(hard_iface->net_dev); 122 + rtnl_unlock(); 115 123 if (!real_netdev) 116 124 goto default_throughput; 117 125
+4 -4
net/batman-adv/hard-interface.c
··· 204 204 } 205 205 206 206 /** 207 - * batadv_get_real_netdevice() - check if the given netdev struct is a virtual 207 + * __batadv_get_real_netdev() - check if the given netdev struct is a virtual 208 208 * interface on top of another 'real' interface 209 209 * @netdev: the device to check 210 210 * ··· 214 214 * Return: the 'real' net device or the original net device and NULL in case 215 215 * of an error. 216 216 */ 217 - static struct net_device *batadv_get_real_netdevice(struct net_device *netdev) 217 + struct net_device *__batadv_get_real_netdev(struct net_device *netdev) 218 218 { 219 219 struct batadv_hard_iface *hard_iface = NULL; 220 220 struct net_device *real_netdev = NULL; ··· 267 267 struct net_device *real_netdev; 268 268 269 269 rtnl_lock(); 270 - real_netdev = batadv_get_real_netdevice(net_device); 270 + real_netdev = __batadv_get_real_netdev(net_device); 271 271 rtnl_unlock(); 272 272 273 273 return real_netdev; ··· 336 336 if (batadv_is_cfg80211_netdev(net_device)) 337 337 wifi_flags |= BATADV_HARDIF_WIFI_CFG80211_DIRECT; 338 338 339 - real_netdev = batadv_get_real_netdevice(net_device); 339 + real_netdev = __batadv_get_real_netdev(net_device); 340 340 if (!real_netdev) 341 341 return wifi_flags; 342 342
+1
net/batman-adv/hard-interface.h
··· 67 67 68 68 extern struct notifier_block batadv_hard_if_notifier; 69 69 70 + struct net_device *__batadv_get_real_netdev(struct net_device *net_device); 70 71 struct net_device *batadv_get_real_netdev(struct net_device *net_device); 71 72 bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface); 72 73 bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface);