ed01e50acd
If device_add() fails, cleanup the cdev. Otherwise, we leak a kobj_map()
with a stale device number.
As Jason points out, there is a small possibility that userspace has
opened and mapped the device in the time between cdev_add() and the
device_add() failure. We need a new kill_dax_dev() helper to invalidate
any established mappings.
Fixes:
|
||
---|---|---|
.. | ||
dax.c | ||
dax.h | ||
Kconfig | ||
Makefile | ||
pmem.c |