usbip: vudc: fix null pointer dereference on udc->lock
Currently the driver attempts to spin lock on udc->lock before a NULL pointer check is performed on udc, hence there is a potential null pointer dereference on udc->lock. Fix this by moving the null check on udc before the lock occurs. Fixes: ea6873a4 ("usbip: vudc: Add SysFS infrastructure for VUDC") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NShuah Khan <shuahkh@osg.samsung.com> Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录