Re: [PATCH] libnvdimm: fix NULL pointer dereference

From: Keith Busch
Date: Tue Jul 24 2018 - 15:46:29 EST


On Tue, Jul 24, 2018 at 08:40:06AM -0500, Gustavo A. R. Silva wrote:
> ndd is being dereferenced before it is null checked, hence there is a
> potential null pointer dereference.
>
> Fix this by moving the pointer dereference after ndd has been properly
> null checked at line 554: if (!ndd)

I'll fold this into v4 of the patch since Vishal found an issue when a
DIMM has multiple regions.