* [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload
@ 2013-05-14 21:29 Sam Bradshaw
0 siblings, 0 replies; 3+ messages in thread
From: Sam Bradshaw @ 2013-05-14 21:29 UTC (permalink / raw)
To: axboe; +Cc: linux-kernel, asamymuthupa
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>
---
diff --git a/drivers/block/mtip32xx/mtip32xx.c
b/drivers/block/mtip32xx/mtip32xx.c
index 847107e..e366c74 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);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload
@ 2013-05-14 21:52 Sam Bradshaw
2013-05-15 8:04 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Sam Bradshaw @ 2013-05-14 21:52 UTC (permalink / raw)
To: axboe; +Cc: linux-kernel, asamymuthupa, sbradshaw
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>
---
diff --git a/drivers/block/mtip32xx/mtip32xx.c
b/drivers/block/mtip32xx/mtip32xx.c
index 847107e..e366c74 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);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload
2013-05-14 21:52 [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload Sam Bradshaw
@ 2013-05-15 8:04 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2013-05-15 8:04 UTC (permalink / raw)
To: Sam Bradshaw; +Cc: linux-kernel, asamymuthupa
On Tue, May 14 2013, Sam Bradshaw wrote:
> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-15 8:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 21:52 [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload Sam Bradshaw
2013-05-15 8:04 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2013-05-14 21:29 Sam Bradshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox