summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorSam Bradshaw <sbradshaw@micron.com>2013-05-15 12:04:34 +0400
committerJens Axboe <axboe@kernel.dk>2013-05-15 12:04:34 +0400
commit974a51a245c2c8bece21cf2d3cbfc8261260f729 (patch)
tree6c9706dda460389252d0be19f98a6842c667516a /drivers/block
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
downloadlinux-974a51a245c2c8bece21cf2d3cbfc8261260f729.tar.xz
mtip32xx: Fix NULL pointer dereference during module unload
An open file-handle to one or more of the driver exported debugfs nodes causes raciness in recursive removal during module unload; sometimes a stale parent dentry is dereferenced when more than 1 pci device is present. Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 847107ef0cce..e366c745ec18 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3002,7 +3002,8 @@ static int mtip_hw_debugfs_init(struct driver_data *dd)
static void mtip_hw_debugfs_exit(struct driver_data *dd)
{
- debugfs_remove_recursive(dd->dfs_node);
+ if (dd->dfs_node)
+ debugfs_remove_recursive(dd->dfs_node);
}