提交 6a62f9d5 编写于 作者: J Jes Sorensen 提交者: Kalle Valo

rtl8xxxu: Fix OOPS if user tries to add device via /sys

This driver relies on driver_info in struct usb_device_id, so allowing
adding a device via /sys/bus/usb/drivers/rtl8xxxu/new_id will cause a
NULL pointer dereference.

Set .no_dynamic_id = 1 to disable hot add of USB IDs.
Reported-by: NXose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 cabb550e
......@@ -10141,6 +10141,7 @@ static struct usb_driver rtl8xxxu_driver = {
.probe = rtl8xxxu_probe,
.disconnect = rtl8xxxu_disconnect,
.id_table = dev_table,
.no_dynamic_id = 1,
.disable_hub_initiated_lpm = 1,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册