All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new
@ 2011-02-03 16:07 Andrey Vagin
  2011-02-03 19:46 ` avagin
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Vagin @ 2011-02-03 16:07 UTC (permalink / raw)
  To: Al Viro; +Cc: Tejun Heo, Andrew Morton, linux-kernel, Andrey Vagin

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);
 	}
-- 
1.7.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new
  2011-02-03 16:07 [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new Andrey Vagin
@ 2011-02-03 19:46 ` avagin
  0 siblings, 0 replies; 4+ messages in thread
From: avagin @ 2011-02-03 19:46 UTC (permalink / raw)
  To: Andrey Vagin; +Cc: Al Viro, Tejun Heo, Andrew Morton, linux-kernel

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);
>   	}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new
  2011-02-03 11:29 Andrey Vagin
@ 2011-02-03 15:56 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-02-03 15:56 UTC (permalink / raw)
  To: Andrey Vagin; +Cc: linux-kernel

On Thu, Feb 03, 2011 at 02:29:11PM +0300, 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 +-

Nice, but I'm not the devpts maintainer, why not send this to the vfs
maintainer instead?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new
@ 2011-02-03 11:29 Andrey Vagin
  2011-02-03 15:56 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Vagin @ 2011-02-03 11:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Andrey Vagin

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);
 	}
-- 
1.7.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-03 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 16:07 [PATCH] fs: Correctly check d_alloc_name() return code in devpts_pty_new Andrey Vagin
2011-02-03 19:46 ` avagin
  -- strict thread matches above, loose matches on Subject: below --
2011-02-03 11:29 Andrey Vagin
2011-02-03 15:56 ` Greg KH

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.