Skip to content

Commit

Permalink
mtip32xx: Fix NULL pointer dereference during module unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Bradshaw authored and Jens Axboe committed May 15, 2013
1 parent f722406 commit 974a51a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit 974a51a

Please sign in to comment.