Commit 434cf3cd authored by Mathias Nyman's avatar Mathias Nyman Committed by Treehugger Robot
Browse files

UPSTREAM: xhci: fix possible null pointer dereference at secondary interrupter removal



Don't try to remove a secondary interrupter that is known to be invalid.
Also check if the interrupter is valid inside the spinlock that protects
the array of interrupters.

Found by smatch static checker

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-usb/ffaa0a1b-5984-4a1f-bfd3-9184630a97b9@moroto.mountain/


Fixes: c99b38c4 ("xhci: add support to allocate several interrupters")
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240125152737.2983959-2-mathias.nyman@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 264371591
Change-Id: I2703d378c9da97e6e8193a48d47dd9ab90218d25
(cherry picked from commit a54a594d)
Signed-off-by: default avatarWesley Cheng <quic_wcheng@quicinc.com>
parent 8cea04d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment