diff options
author | Prashanth K <quic_prashk@quicinc.com> | 2024-02-29 16:14:38 +0200 |
---|---|---|
committer | mdb:android-git <superproject-auto-update@invalid> | 2024-03-06 18:30:53 +0000 |
commit | 03177998a39d2ed9cbc35fa36f7b1e06701eb667 (patch) | |
tree | d4dc3bce91d50f3dcc14441a517831f451822840 | |
parent | a76dfbf92fcaae4f7b3c1769bf613f4297d6b2bf (diff) | |
download | superproject-03177998a39d2ed9cbc35fa36f7b1e06701eb667.tar.gz |
FROMGIT: usb: xhci: Add error handling in xhci_map_urb_for_dma
Currently xhci_map_urb_for_dma() creates a temporary buffer and copies
the SG list to the new linear buffer. But if the kzalloc_node() fails,
then the following sg_pcopy_to_buffer() can lead to crash since it
tries to memcpy to NULL pointer.
So return -ENOMEM if kzalloc returns null pointer.
Cc: stable@vger.kernel.org # 5.11
Fixes: 2017a1e58472 ("usb: xhci: Use temporary buffer to consolidate SG")
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240229141438.619372-10-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 328151586
(cherry picked from commit be95cc6d71dfd0cba66e3621c65413321b398052
https: //git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
Change-Id: I02d1b43bd9910a28034d0363a2cca86864379aaf
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
m--------- | common | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/common b/common -Subproject 9b613572d6246da9b616f34e4a0e0b5ac74b2dd +Subproject 4782f1c2337058218098c472c95af1b6cbb727e |