Message ID | 20190125080205.10594-1-sven@narfation.org |
---|---|
State | Accepted, archived |
Commit | e6150db855210a085feb4c5e4daadb285a668bba |
Delegated to: | Simon Wunderlich |
Headers | show |
Series | [maint] batman-adv: release station info tidstats | expand |
Huh, sorry about that. > From: Felix Fietkau <nbd@nbd.name> If Felix had nothing to do with the patch, why would you pretend otherwise? You need two patches - one for backports, this part: > compat-include/net/cfg80211.h | 7 +++++++ And for mainline, this part: > net/batman-adv/bat_v_elp.c | 3 +++ So send the two separate patches to the two separate projects, and that's it? johannes
On Friday, 25 January 2019 08.16.46 CET Berg, Johannes wrote: > Huh, sorry about that. > > > From: Felix Fietkau <nbd@nbd.name> > > If Felix had nothing to do with the patch, why would you pretend otherwise? This is what he has dropped and Martin Weinelt forwarded to us: http://nbd.name/batman-adv-memleak.patch So just the net/batman-adv/bat_v_elp.c part without anything else. > You need two patches - one for backports, this part: > > > compat-include/net/cfg80211.h | 7 +++++++ This is not for backports [0] - this is for batman-adv.git [1] > And for mainline, this part: > > > net/batman-adv/bat_v_elp.c | 3 +++ > > So send the two separate patches to the two separate projects, and that's it? The upstream patch (for David) is just stripped from the compat-include part. Kind regards, Sven [0] https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/ [1] https://git.open-mesh.org/batman-adv.git [2] https://git.open-mesh.org/linux-merge.git/commit/7d652669b61d702c6e62a39579d17f6881670ab6
diff --git a/compat-include/net/cfg80211.h b/compat-include/net/cfg80211.h index 79c028af..6b6a0287 100644 --- a/compat-include/net/cfg80211.h +++ b/compat-include/net/cfg80211.h @@ -79,4 +79,11 @@ static inline int batadv_cfg80211_get_station(struct net_device *dev, #endif /* < KERNEL_VERSION(4, 18, 0) && IS_ENABLED(CONFIG_CFG80211) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) + +#define cfg80211_sinfo_release_content(sinfo) + +#endif /* < KERNEL_VERSION(4, 18, 0) */ + #endif /* _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_ */ diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index e8090f09..ef0dec20 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -104,6 +104,9 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo); + /* free the TID stats immediately */ + cfg80211_sinfo_release_content(&sinfo); + dev_put(real_netdev); if (ret == -ENOENT) { /* Node is not associated anymore! It would be