]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
xhci: check port array allocation was successful before dereferencing it
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 6 Apr 2021 07:02:05 +0000 (10:02 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:32:01 +0000 (10:32 +0200)
commita8b55f8492c28d51ecbffc7c4cc8f71b4613977c
tree76d90dff216d395b5466951cd65964bb9ca40700
parent67f1f146430c1a9b74e74da9857a1de930773dc6
xhci: check port array allocation was successful before dereferencing it

BugLink: https://bugs.launchpad.net/bugs/1928857
[ Upstream commit 8a157d2ff104d2849c58226a1fd02365d7d60150 ]

return if rhub->ports is null after rhub->ports = kcalloc_node()
Klockwork reported issue

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210406070208.3406266-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/host/xhci-mem.c