mac80211: fix ht_capa printout in debugfs.
PATCH 1/1 mac80211: fix ht_capa printout in debugfs.
From: Ben Greear <[email protected]>
Don't use sizeof(pointer) when calculating scnprintf offset.
Fixes mac80211: debugfs: calculate free buffer size correctly (eb3d6175e4a9)
Signed-off-by Ben Greear <[email protected]>
--- net/mac80211/debugfs_sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/debugfs_sta.c +1 -1
@@ -584,7 +584,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,#define PRINT_HT_CAP (_cond, _str) \ do { \ if (_cond) \ - p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \ + p += scnprintf(p, bufsz + buf - p, "\t" _str "\n"); \ } while (0)char *buf, *p;int i;
Signature · 1 line
2.20.1