Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-18 Thread Michael Ellerman
Ma Ke writes: > 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. > > Foun

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-18 Thread Michael Ellerman
Ma Ke writes: >> Michael Ellerman 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

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-16 Thread Ma Ke
> Michael Ellerman 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 potent

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-15 Thread Dan Carpenter
On Mon, Jul 15, 2024 at 04:28:15PM +1000, Michael Ellerman wrote: > Ma Ke writes: > > 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 n

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-15 Thread Greg Kroah-Hartman
On Mon, Jul 15, 2024 at 03:18:56PM +0200, Markus Elfring 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 > > der

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-15 Thread Markus Elfring
> 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 ana

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-14 Thread Michael Ellerman
Ma Ke writes: > 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. > > Foun

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-14 Thread Greg KH
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 NUL