]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2a90c37e7ac251474c8f1b6850d0c593d3553c48
tree4bcef7479fac27c5c61771f9cc9b5b22571428aa
parentbc6558b6af7398fe8fe2cbbefd2e4945309038fb
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: 134c9574bc54 ("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