Re: [PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread Dan Williams
On Fri, Apr 9, 2021 at 5:33 PM wrote: > > From: Yingjie Wang > > In nd_dax_probe(), nd_dax_alloc() may fail and return NULL. > Check for NULL before attempting to > use nd_dax to avoid a NULL pointer dereference. > > Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support") > Signed-off-by:

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), nd_dax_alloc() may fail and return NULL. Check for NULL before attempting to use nd_dax to avoid a NULL pointer dereference. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support") Signed-off-by: Yingjie Wang --- drivers/nvdimm/dax_devs.c | 2 ++ 1

Re: [PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread Ira Weiny
On Thu, Apr 08, 2021 at 06:58:26PM -0700, wangyingji...@126.com wrote: > From: Yingjie Wang > > In nd_dax_probe(), 'nd_dax' is allocated by nd_dax_alloc(). > nd_dax_alloc() may fail and return NULL, so we should better check Avoid the use of 'we'. > it's return value to avoid a NULL pointer

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-08 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-03-17 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe(), 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")

[PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-03-17 Thread wangyingjie55
From: Yingjie Wang In nd_dax_probe()??? 'nd_dax' is allocated by nd_dax_alloc(). nd_dax_alloc() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support")