lkml.org 
[lkml]   [2024]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [v2] usb: xhci: Add error handling in xhci_map_urb_for_dma
From
On 28.2.2024 14.57, Prashanth K wrote:
> 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>
> ---

Thanks.

Added

-Mathias


\
 
 \ /
  Last update: 2024-05-27 15:28    [W:0.028 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site