]> asedeno.scripts.mit.edu Git - linux.git/commit
libnvdimm: Hold reference on parent while scheduling async init
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Tue, 25 Sep 2018 20:53:02 +0000 (13:53 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 26 Sep 2018 19:02:31 +0000 (12:02 -0700)
commitb6eae0f61db27748606cc00dafcfd1e2c032f0a5
tree98569b815acec26be1d8a78ddfcecd4ac8cd60c7
parent3c5c98d135f50c516631806ce77e50e7ce33bde8
libnvdimm: Hold reference on parent while scheduling async init

Unlike asynchronous initialization in the core we have not yet associated
the device with the parent, and as such the device doesn't hold a reference
to the parent.

In order to resolve that we should be holding a reference on the parent
until the asynchronous initialization has completed.

Cc: <stable@vger.kernel.org>
Fixes: 4d88a97aa9e8 ("libnvdimm: ...base ... infrastructure")
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c