On 4/16/21 2:53 PM, Tom Seewald wrote:
From: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> commit bd8b82042269a95db48074b8bb400678dbac1815 upstream. Fuzzing uncovered race condition between sysfs code paths in usbip drivers. Device connect/disconnect code paths initiated through sysfs interface are prone to races if disconnect happens during connect and vice versa. Use sysfs_lock to protect sysfs paths in vudc. Cc: stable@xxxxxxxxxxxxxxx # 4.9.x # 4.14.x Reported-and-tested-by: syzbot+a93fba6d384346a761e3@xxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/caabcf3fc87bdae970509b5ff32d05bb7ce2fb15.1616807117.git.skhan@xxxxxxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Tom Seewald <tseewald@xxxxxxxxx>
Thank you for the backport. Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Greg, please pick this up for 4.9.x and 4.14.x thanks, -- Shuah