Commit 4e7ef413 authored by Prasanna Meda's avatar Prasanna Meda Committed by Linus Torvalds

[PATCH] /proc/cmdline missing mmput

Fix the mmput bug introduced while fixing cmdline race.
Signed-off-by: default avatarPrasanna Meda <pmeda@akamai.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent be3e0da9
...@@ -343,7 +343,7 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer) ...@@ -343,7 +343,7 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
if (!mm) if (!mm)
goto out; goto out;
if (!mm->arg_end) if (!mm->arg_end)
goto out; /* Shh! No looking before we're done */ goto out_mm; /* Shh! No looking before we're done */
len = mm->arg_end - mm->arg_start; len = mm->arg_end - mm->arg_start;
...@@ -366,8 +366,8 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer) ...@@ -366,8 +366,8 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)
res = strnlen(buffer, res); res = strnlen(buffer, res);
} }
} }
out_mm:
mmput(mm); mmput(mm);
out: out:
return res; return res;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment