staging/usbip: userspace - fix usbipd SIGSEGV from refresh_exported_devices()
authorShuah Khan <shuah.kh@samsung.com>
Mon, 24 Mar 2014 19:45:13 +0000 (13:45 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 21:43:01 +0000 (14:43 -0700)
commit21c5e8408d105386c54603aed2cae9195143d87d
tree8e69e1885848966a147e88ca88b295c2ad6e887c
parentec03ab77cc2c39d115118fcd4fc11a5801cbb70e
staging/usbip: userspace - fix usbipd SIGSEGV from refresh_exported_devices()

refresh_exported_devices() doesn't check udev_device_new_from_syspath()
return value and passed in null dev to udev_device_get_driver() resulting
in a segmentation fault. Change it to check for null return value from
both udev_device_new_from_syspath() and udev_device_get_driver().

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c