summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-10-29 12:55:47 -0700
committerDan Williams <dan.j.williams@intel.com>2021-11-15 11:02:58 -0800
commit08b9e0ab8af48895337192e683de44ab1e1b7427 (patch)
treeb668eb9786578faccd1bb7e8b1c9f817f29b3f74 /usr
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff)
cxl/pmem: Fix reference counting for delayed work
There is a potential race between queue_work() returning and the queued-work running that could result in put_device() running before get_device(). Introduce the cxl_nvdimm_bridge_state_work() helper that takes the reference unconditionally, but drops it if no new work was queued, to keep the references balanced. Fixes: 8fdcb1704f61 ("cxl/pmem: Add initial infrastructure for pmem support") Cc: <stable@vger.kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Ben Widawsky <ben.widawsky@intel.com> Link: https://lore.kernel.org/r/163553734757.2509761.3305231863616785470.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions