All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] proc: sysctl: fix double drop_sysctl_table()
@ 2018-12-22  2:12 Yafang Shao
  2018-12-22  3:17 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Yafang Shao @ 2018-12-22  2:12 UTC (permalink / raw)
  To: mcgrof, keescook, adobriyan, akpm
  Cc: linux-fsdevel, linux-kernel, Yafang Shao

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@gmail.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-22 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22  2:12 [PATCH] proc: sysctl: fix double drop_sysctl_table() Yafang Shao
2018-12-22  3:17 ` Al Viro
2018-12-22 15:13   ` Yafang Shao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.