From: Jack Vogel Date: Wed, 11 Apr 2018 04:35:49 +0000 (-0700) Subject: Revert "sysctl: Drop reference added by grab_header in proc_sys_readdir" X-Git-Tag: v4.1.12-124.31.3~863 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=03d46be63a2422233b3db65cfc767177ec570015;p=users%2Fjedix%2Flinux-maple.git Revert "sysctl: Drop reference added by grab_header in proc_sys_readdir" This reverts commit ae3ad84cc98a31bc65525115e61bd9f0c2334cc1. The commit has a bogus CVE number which needs to be corrected. Simply changing the metadata here. Signed-off-by: Jack Vogel --- diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 68c770854ba5..fdda62e6115e 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -703,7 +703,7 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx) ctl_dir = container_of(head, struct ctl_dir, header); if (!dir_emit_dots(file, ctx)) - goto out; + return 0; pos = 2; @@ -713,7 +713,6 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx) break; } } -out: sysctl_head_finish(head); return 0; }