Re: [PATCH] fs/char_dev: fix cdev_put() vs f_op->release() use-after-free

2016-08-10 Thread Al Viro
On Wed, Aug 10, 2016 at 09:49:22PM -0700, Dan Williams wrote: > Where dax_dev_release() is the f_op->release() method, and is > implemented to simply drop the final references on our driver objects: > > struct dax_dev *dax_dev = filp->private_data; > struct device *dev = dax_dev->

[PATCH] fs/char_dev: fix cdev_put() vs f_op->release() use-after-free

2016-08-10 Thread Dan Williams
drivers/dax/dax.c implements a character device that supports mmap(). While trying to convert it to use the cdev api a unit test started failing. The test effectively does the following to test that the driver revokes active mappings when the device is unregistered: fd = open("/dev/dax0.0", ..

[PATCH] tools/testing/nvdimm: fix SIGTERM vs hotplug crash

2016-08-10 Thread Dan Williams
The unit tests crash when hotplug races the previous probe. This race requires that the loading of the nfit_test module be terminated with SIGTERM, and the module to be unloaded while the ars scan is still running. In contrast to the normal nfit driver, the unit test calls acpi_nfit_init() twice t

Re: [PATCH 1/3] radix-tree: 'slot' can be NULL in radix_tree_next_slot()

2016-08-10 Thread Ross Zwisler
On Wed, Aug 10, 2016 at 09:29:23AM +0300, Konstantin Khlebnikov wrote: > On Tue, Aug 9, 2016 at 6:27 PM, Ross Zwisler > wrote: > > On Mon, Aug 08, 2016 at 10:21:39PM +0300, Konstantin Khlebnikov wrote: > > <> > >> NAK. This is fast path and it's already bloated. > >> I want to revert most changes