Skip to contentSkip to conversation

mtip32xx: Fix NULL pointer dereference during module unload

PATCH Applied Sam Bradshaw 2 participants 2 messages May 14, 2013 – May 15, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

(quoted diff) +0 -0

b/drivers/block/mtip32xx/mtip32xx.c
index 847107e..e366c74 100644

drivers/block/mtip32xx/mtip32xx.c +0 -0
@@ -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);
}

maintainer Applied
#1 lore raw
Quoted 4 lines · Sam Bradshaw

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.

Thanks applied, I hit this one too recently.

Signature · 1 line
Jens Axboe