[PATCH v4] cxl: Fix possible null pointer dereference in read_handle()
Greg KH
gregkh at linuxfoundation.org
Mon Jul 15 15:12:32 AEST 2024
On Mon, Jul 15, 2024 at 10:54:42AM +0800, Ma Ke wrote:
> In read_handle(), of_get_address() may return NULL if getting address and
> size of the node failed. When of_read_number() uses prop to handle
> conversions between different byte orders, it could lead to a null pointer
> dereference. Add NULL check to fix potential issue.
>
> Found by static analysis.
You need to describe the tool that found this. And how did you test
that your fix is correct?
thanks,
greg k-h
More information about the Linuxppc-dev
mailing list