]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.20.16/batman-adv-release-station-info-tidstats.patch
Linux 4.20.16
[thirdparty/kernel/stable-queue.git] / releases / 4.20.16 / batman-adv-release-station-info-tidstats.patch
1 From 129bad15113a189b57234962a14689a164b24841 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Fri, 25 Jan 2019 08:21:26 +0100
4 Subject: batman-adv: release station info tidstats
5
6 [ Upstream commit 7d652669b61d702c6e62a39579d17f6881670ab6 ]
7
8 With the addition of TXQ stats in the per-tid statistics the struct
9 station_info grew significantly. This resulted in stack size warnings
10 due to the structure itself being above the limit for the warnings.
11
12 To work around this, the TID array was allocated dynamically. Also a
13 function to free this content was introduced with commit 7ea3e110f2f8
14 ("cfg80211: release station info tidstats where needed") but the necessary
15 changes were not provided for batman-adv's B.A.T.M.A.N. V implementation.
16
17 Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info")
19 [sven@narfation.org: add commit message]
20 Signed-off-by: Sven Eckelmann <sven@narfation.org>
21 Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
22 Signed-off-by: Sasha Levin <sashal@kernel.org>
23 ---
24 net/batman-adv/bat_v_elp.c | 3 +++
25 1 file changed, 3 insertions(+)
26
27 diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
28 index e8090f099eb8..ef0dec20c7d8 100644
29 --- a/net/batman-adv/bat_v_elp.c
30 +++ b/net/batman-adv/bat_v_elp.c
31 @@ -104,6 +104,9 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
32
33 ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo);
34
35 + /* free the TID stats immediately */
36 + cfg80211_sinfo_release_content(&sinfo);
37 +
38 dev_put(real_netdev);
39 if (ret == -ENOENT) {
40 /* Node is not associated anymore! It would be
41 --
42 2.19.1
43