Re: [PATCH] brd: fix uninitialized use of brd->dax_dev

From: Dan Williams
Date: Wed May 03 2017 - 14:44:28 EST


On Wed, May 3, 2017 at 5:56 AM, Gerald Schaefer
<gerald.schaefer@xxxxxxxxxx> wrote:
> commit 1647b9b9 "brd: add dax_operations support" introduced the allocation
> and freeing of a dax_device, but the allocated dax_device is not stored
> into the brd_device, so brd_del_one() will eventually operate on an
> uninitialized brd->dax_dev.
>
> Fix this by storing the allocated dax_device to brd->dax_dev.
>
> Signed-off-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>

Thanks Gerald, I added this to the dax_device conversion for 4.12.