[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130128120859.GB29865@linux.vnet.ibm.com>
Date: Mon, 28 Jan 2013 17:38:59 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Anton Arapov <anton@...hat.com>,
Frank Eigler <fche@...hat.com>,
Josh Stone <jistone@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
"Suzuki K. Poulose" <suzuki@...ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] uprobes: Fix dentry/mount leak in
create_trace_uprobe()
* Oleg Nesterov <oleg@...hat.com> [2013-01-27 20:48:33]:
> create_trace_uprobe() does kern_path() to find ->d_inode, but forgets
> to do path_put(). We can do this right after igrab().
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> ---
> kernel/trace/trace_uprobe.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> index f3fd8ff..53afabe 100644
> --- a/kernel/trace/trace_uprobe.c
> +++ b/kernel/trace/trace_uprobe.c
> @@ -255,12 +255,13 @@ static int create_trace_uprobe(int argc, char **argv)
> if (ret)
> goto fail_address_parse;
>
> + inode = igrab(path.dentry->d_inode);
> + path_put(&path);
> +
> ret = kstrtoul(arg, 0, &offset);
> if (ret)
> goto fail_address_parse;
>
> - inode = igrab(path.dentry->d_inode);
> -
> argc -= 2;
> argv += 2;
>
> --
> 1.5.5.1
>
--
Thanks and Regards
Srikar Dronamraju
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists