[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1545444741-31694-1-git-send-email-laoar.shao@gmail.com>
Date: Sat, 22 Dec 2018 10:12:21 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: mcgrof@...nel.org, keescook@...omium.org, adobriyan@...il.com,
akpm@...ux-foundation.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Yafang Shao <laoar.shao@...il.com>
Subject: [PATCH] proc: sysctl: fix double drop_sysctl_table()
The callers of insert_header() will drop sysctl table whatever
insert_header() successes or fails.
So we can't call drop_sysctl_table() in insert_header().
The call sites of insert_header() are all in fs/proc/proc_sysctl.c.
Signed-off-by: Yafang Shao <laoar.shao@...il.com>
---
fs/proc/proc_sysctl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 4d598a3..5eddca4 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -241,7 +241,6 @@ static int insert_header(struct ctl_dir *dir, struct ctl_table_header *header)
if (header->ctl_table == sysctl_mount_point)
clear_empty_dir(dir);
header->parent = NULL;
- drop_sysctl_table(&dir->header);
return err;
}
--
1.8.3.1
Powered by blists - more mailing lists