usbip: fix usbip bind writing random string after command in match_busid
authorJuan Zea <juan.zea@qindel.com>
Fri, 15 Dec 2017 09:21:20 +0000 (10:21 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 3 Mar 2018 15:50:50 +0000 (15:50 +0000)
commit10a272f0242add15497e485c8d8bf31debd5ab20
treec5aedeee6566ec608d34c3435a0048f34e4bda23
parent10f1f61202688423e5e70f78f72c0af2b30ea343
usbip: fix usbip bind writing random string after command in match_busid

commit 544c4605acc5ae4afe7dd5914147947db182f2fb upstream.

usbip bind writes commands followed by random string when writing to
match_busid attribute in sysfs, caused by using full variable size
instead of string length.

Signed-off-by: Juan Zea <juan.zea@qindel.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/usbip/userspace/src/utils.c