Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1521997
| From | Rob Rice <rob.rice@broadcom.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/11] mailbox: bcm-pdc: PDC driver leaves debugfs files after removal |
| Date | 2016-11-14 19:40 +0100 |
| Message-ID | <sDukH-2cH-59@gated-at.bofh.it> (permalink) |
| References | <sDuaZ-28T-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Steve Lin <steven.lin1@broadcom.com>
Minor fix to ensure that debugfs stats pseudo-files are
removed when driver module is unloaded. Previously, the call to
debugfs_remove_recursive() was never being called since the
directory was not empty, and a seg fault would occur if another
process tried to access these leftover files.
Signed-off-by: Steve Lin <steven.lin1@broadcom.com>
Signed-off-by: Rob Rice <rob.rice@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
---
drivers/mailbox/bcm-pdc-mailbox.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c
index 3b4ebbe..c9434a7 100644
--- a/drivers/mailbox/bcm-pdc-mailbox.c
+++ b/drivers/mailbox/bcm-pdc-mailbox.c
@@ -492,10 +492,8 @@ static void pdc_setup_debugfs(struct pdc_state *pdcs)
static void pdc_free_debugfs(void)
{
- if (debugfs_dir && simple_empty(debugfs_dir)) {
- debugfs_remove_recursive(debugfs_dir);
- debugfs_dir = NULL;
- }
+ debugfs_remove_recursive(debugfs_dir);
+ debugfs_dir = NULL;
}
/**
--
2.1.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/11] mailbox: bcm-pdc: PDC driver leaves debugfs files after removal Rob Rice <rob.rice@broadcom.com> - 2016-11-14 19:40 +0100
csiph-web