LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "avagin@gmail.com" <avagin@gmail.com>
To: Andrey Vagin <avagin@openvz.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new
Date: Thu, 03 Feb 2011 22:46:25 +0300	[thread overview]
Message-ID: <4D4B0611.5010509@gmail.com> (raw)
In-Reply-To: <1296749257-12993-1-git-send-email-avagin@openvz.org>

Sorry, I found one more similar place, so will send another patch.

On 02/03/2011 07:07 PM, Andrey Vagin wrote:
> d_alloc_name return NULL in case error, but we expect errno in
> devpts_pty_new.
>
> http://bugzilla.openvz.org/show_bug.cgi?id=1758
>
> Signed-off-by: Andrey Vagin<avagin@openvz.org>
> ---
>   fs/devpts/inode.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
> index 1bb547c..8392c8c 100644
> --- a/fs/devpts/inode.c
> +++ b/fs/devpts/inode.c
> @@ -501,7 +501,7 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty)
>   	mutex_lock(&root->d_inode->i_mutex);
>
>   	dentry = d_alloc_name(root, s);
> -	if (!IS_ERR(dentry)) {
> +	if (dentry) {
>   		d_add(dentry, inode);
>   		fsnotify_create(root->d_inode, dentry);
>   	}


  reply	other threads:[~2011-02-03 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 16:07 Andrey Vagin
2011-02-03 19:46 ` avagin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-03 11:29 Andrey Vagin
2011-02-03 15:56 ` Greg KH

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=4D4B0611.5010509@gmail.com \
    --to=avagin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).