Skip to content
Snippets Groups Projects
user avatar
Andrey Strachuk authored
usb: cdns3: change place of 'priv_ep' assignment in cdns3_gadget_ep_dequeue(), cdns3_gadget_ep_enable()

If 'ep' is NULL, result of ep_to_cdns3_ep(ep) is invalid pointer
and its dereference with priv_ep->cdns3_dev may cause panic.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7733f6c3 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Acked-by: default avatarPeter Chen <peter.chen@kernel.org>
Signed-off-by: default avatarAndrey Strachuk <strochuk@ispras.ru>
Link: https://lore.kernel.org/r/20220718160052.4188-1-strochuk@ispras.ru


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
c3ffc9c4
History
Name Last commit Last update