summaryrefslogtreecommitdiff
path: root/net/qrtr
diff options
context:
space:
mode:
authorShayne Chen <shayne.chen@mediatek.com>2021-01-12 11:20:28 +0800
committerJohannes Berg <johannes.berg@intel.com>2021-01-14 22:23:56 +0100
commit6020d534fa012b80c6d13811dc4d2dfedca2e403 (patch)
tree4421f1c2cb4d5d6ec860fa29ef4d8e75a75c8b06 /net/qrtr
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 <sujuan.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://lore.kernel.org/r/20210112032028.7482-1-shayne.chen@mediatek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/qrtr')
0 files changed, 0 insertions, 0 deletions