From: Sam Bradshaw <sbradshaw@micron.com>
To: <axboe@kernel.dk>
Cc: <linux-kernel@vger.kernel.org>, <asamymuthupa@mcrion.com>
Subject: [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload
Date: Tue, 14 May 2013 14:29:26 -0700 [thread overview]
Message-ID: <5192ACB6.5000302@micron.com> (raw)
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);
}
next reply other threads:[~2013-05-14 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 21:29 Sam Bradshaw [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-05-14 21:52 [PATCH][TRIVIAL] mtip32xx: Fix NULL pointer dereference during module unload Sam Bradshaw
2013-05-15 8:04 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5192ACB6.5000302@micron.com \
--to=sbradshaw@micron.com \
--cc=asamymuthupa@mcrion.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox