mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
usb: usbtmc: don't store usb_device_id
usb_device_id is not guaranteed to live longer than probe due to presence of dynamic ID. This stored ID is unused so remove it. Reviewed-by: Manuel Ebner <manuelebner@mailbox.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260707-usb_dyn_id_uaf-v2-2-632dcf3adfba@garyguo.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
14d2ac442d
commit
fc045acec1
@@ -71,7 +71,6 @@ struct usbtmc_dev_capabilities {
|
||||
* allocated for each USBTMC device in the driver's probe function.
|
||||
*/
|
||||
struct usbtmc_device_data {
|
||||
const struct usb_device_id *id;
|
||||
struct usb_device *usb_dev;
|
||||
struct usb_interface *intf;
|
||||
struct list_head file_list;
|
||||
@@ -2394,7 +2393,6 @@ static int usbtmc_probe(struct usb_interface *intf,
|
||||
return -ENOMEM;
|
||||
|
||||
data->intf = intf;
|
||||
data->id = id;
|
||||
data->usb_dev = usb_get_dev(interface_to_usbdev(intf));
|
||||
usb_set_intfdata(intf, data);
|
||||
kref_init(&data->kref);
|
||||
|
||||
Reference in New Issue
Block a user