From: Alex Elder <elder@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>, linux-kernel@vger.kernel.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH] debugfs: allow bad parent pointers to be passed in
Date: Mon, 30 Mar 2015 12:08:43 -0500 [thread overview]
Message-ID: <5519831B.8050500@linaro.org> (raw)
In-Reply-To: <20150330125915.GA1523@kroah.com>
On 03/30/2015 07:59 AM, Greg KH wrote:
> If something went wrong with creating a debugfs file/symlink/directory,
> that value could be passed down into debugfs again as a parent dentry.
> To make caller code simpler, just error out if this happens, and don't
> crash the kernel.
>
> Reported-by: Alex Elder <elder@linaro.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Looks good.
Reviewed-by: Alex Elder <elder@linaro.org>
>
> ---
> fs/debugfs/inode.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- a/fs/debugfs/inode.c
> +++ b/fs/debugfs/inode.c
> @@ -254,6 +254,9 @@ static struct dentry *start_creating(con
>
> pr_debug("debugfs: creating file '%s'\n",name);
>
> + if (IS_ERR(parent))
> + return parent;
> +
> error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
> &debugfs_mount_count);
> if (error)
>
prev parent reply other threads:[~2015-03-30 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 12:59 [PATCH] debugfs: allow bad parent pointers to be passed in Greg KH
2015-03-30 13:07 ` Viresh Kumar
2015-03-30 17:08 ` Alex Elder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5519831B.8050500@linaro.org \
--to=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.