diff options
author | Emiliano Ingrassia <ingrassia@epigenesys.com> | 2019-11-27 19:03:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-17 22:34:41 +0300 |
commit | cf6a2fbc065a13579b0084b32650f8b045689979 (patch) | |
tree | cab79d9da64d621d8768706f662dd85a0650503f /drivers/usb/core/urb.c | |
parent | 8ae04b7d94722219bafa6e3f97f160ff5b8e7cc3 (diff) | |
download | linux-cf6a2fbc065a13579b0084b32650f8b045689979.tar.xz |
usb: core: urb: fix URB structure initialization function
commit 1cd17f7f0def31e3695501c4f86cd3faf8489840 upstream.
Explicitly initialize URB structure urb_list field in usb_init_urb().
This field can be potentially accessed uninitialized and its
initialization is coherent with the usage of list_del_init() in
usb_hcd_unlink_urb_from_ep() and usb_giveback_urb_bh() and its
explicit initialization in usb_hcd_submit_urb() error path.
Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191127160355.GA27196@ingrassia.epigenesys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r-- | drivers/usb/core/urb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index f51750bcd152..5e844097a9e3 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -45,6 +45,7 @@ void usb_init_urb(struct urb *urb) if (urb) { memset(urb, 0, sizeof(*urb)); kref_init(&urb->kref); + INIT_LIST_HEAD(&urb->urb_list); INIT_LIST_HEAD(&urb->anchor_list); } } |