mac80211: debugfs: calculate free buffer size correctly
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Thu, 21 Oct 2021 14:30:36 +0000 (16:30 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 21 Oct 2021 14:46:02 +0000 (16:46 +0200)
commiteb3d6175e4a904f7e4b0216c52810ac6065877df
tree4bcef7479fac27c5c61771f9cc9b5b22571428aa
parent171964252189d8ad5672c730f2197aa73092db6e
mac80211: debugfs: calculate free buffer size correctly

In breaking patch buf memory moved from stack to heap and sizeof(buf)
change from size of actual memory to size of the pointer to the heap.

Fix this by holding a separated variable for allocate size.

Fixes: 01f84f0ed3b4 ("mac80211: reduce stack usage in debugfs")
Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Link: https://lore.kernel.org/r/20211021163035.b9ae48c06e27.I6a6ed197110eae28cf4f6e38ce36828a7c136337@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/debugfs_sta.c