mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
staging: frontier: use after free in disconnect()
usb_alphatrack_delete() frees "dev" so we can't use it on that path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4b18f08be0
commit
c8145c5610
@ -827,11 +827,11 @@ static void usb_alphatrack_disconnect(struct usb_interface *intf)
|
||||
mutex_unlock(&dev->mtx);
|
||||
usb_alphatrack_delete(dev);
|
||||
} else {
|
||||
atomic_set(&dev->writes_pending, 0);
|
||||
dev->intf = NULL;
|
||||
mutex_unlock(&dev->mtx);
|
||||
}
|
||||
|
||||
atomic_set(&dev->writes_pending, 0);
|
||||
mutex_unlock(&disconnect_mutex);
|
||||
|
||||
dev_info(&intf->dev, "Alphatrack Surface #%d now disconnected\n",
|
||||
|
Loading…
Reference in New Issue
Block a user