]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: musb: trace: fix NULL pointer dereference in musb_g_tx()
authorBin Liu <b-liu@ti.com>
Mon, 30 Apr 2018 16:20:54 +0000 (11:20 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:25:21 +0000 (12:25 +0200)
commitdf19dffa69541aad9919005afd761925a264d405
tree2844062da04a781d7191ec2214ac7b45fe56b9d9
parentaeaab388529b8d3728754c30a42ff4093bc61097
usb: musb: trace: fix NULL pointer dereference in musb_g_tx()

BugLink: http://bugs.launchpad.net/bugs/1778759
commit 9aea9b6cc78d2b99b23d84fb2e0bc6e464c6569e upstream.

The usb_request pointer could be NULL in musb_g_tx(), where the
tracepoint call would trigger the NULL pointer dereference failure when
parsing the members of the usb_request pointer.

Move the tracepoint call to where the usb_request pointer is already
checked to solve the issue.

Fixes: fc78003e5345 ("usb: musb: gadget: add usb-request tracepoints")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/musb/musb_gadget.c