aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorShayne Chen <[email protected]>2021-01-12 11:20:28 +0800
committerJohannes Berg <[email protected]>2021-01-14 22:23:56 +0100
commit6020d534fa012b80c6d13811dc4d2dfedca2e403 (patch)
tree4421f1c2cb4d5d6ec860fa29ef4d8e75a75c8b06 /tools/perf/scripts/python/exported-sql-viewer.py
parentc2083e280a3d4f71941c9c57992d4e621e4e33c5 (diff)
mac80211: fix incorrect strlen of .write in debugfs
This fixes strlen mismatch problems happening in some .write callbacks of debugfs. When trying to configure airtime_flags in debugfs, an error appeared: ash: write error: Invalid argument The error is returned from kstrtou16() since a wrong length makes it miss the real end of input string. To fix this, use count as the string length, and set proper end of string for a char buffer. The debug print is shown - airtime_flags_write: count = 2, len = 8, where the actual length is 2, but "len = strlen(buf)" gets 8. Also cleanup the other similar cases for the sake of consistency. Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions