Re: [PATCH v14 01/53] xhci: fix possible null pointer dereference at secondary interrupter removal

From: Wesley Cheng
Date: Fri Feb 09 2024 - 15:18:10 EST

Hi Greg,

On 2/9/2024 2:22 AM, Greg KH wrote:
On Thu, Feb 08, 2024 at 03:13:14PM -0800, Wesley Cheng wrote:
From: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>

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: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Fixes: c99b38c41234 ("xhci: add support to allocate several interrupters")
Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Wesley Cheng <quic_wcheng@xxxxxxxxxxx>

Wait, this is already in my tree, right? Why keep sending it?

Sorry, I noticed this yesterday night as well when I was preparing some changes to push elsewhere. Will remove the ones I saw that were already present on usb-next.

Wesley Cheng