aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2024-08-09 12:44:07 +0000
committerGreg Kroah-Hartman <[email protected]>2024-08-13 08:26:27 +0000
commitdcdb52d948f3a17ccd3fce757d9bd981d7c32039 (patch)
tree065451d13228644842421418f15fd730686ccbc1 /rust/helpers/helpers.c
parentMerge tag 'thunderbolt-for-v6.11-rc3' of ssh://gitolite.kernel.org/pub/scm/li... (diff)
downloadkernel-dcdb52d948f3a17ccd3fce757d9bd981d7c32039.tar.gz
kernel-dcdb52d948f3a17ccd3fce757d9bd981d7c32039.zip
usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
If xhci_mem_init() fails, it calls into xhci_mem_cleanup() to mop up the damage. If it fails early enough, before xhci->interrupters is allocated but after xhci->max_interrupters has been set, which happens in most (all?) cases, things get uglier, as xhci_mem_cleanup() unconditionally derefences xhci->interrupters. With prejudice. Gate the interrupt freeing loop with a check on xhci->interrupters being non-NULL. Found while debugging a DMA allocation issue that led the XHCI driver on this exact path. Fixes: c99b38c41234 ("xhci: add support to allocate several interrupters") Cc: Mathias Nyman <[email protected]> Cc: Wesley Cheng <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: [email protected] # 6.8+ Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions