All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Propagate error code from devpts_pty_new
@ 2008-04-16 22:15 sukadev
       [not found] ` <20080416221524.GA7112-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: sukadev @ 2008-04-16 22:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: serue, Eric W. Biederman, hpa, Containers, linux-kernel

From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH]: Propagate error code from devpts_pty_new

Have ptmx_open() propagate any error code returned by devpts_pty_new()
(which returns either 0 or -ENOMEM anyway).

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
---
 drivers/char/tty_io.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
===================================================================
--- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:38:23.000000000 -0700
+++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
@@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
 	filp->private_data = tty;
 	file_move(filp, &tty->tty_files);
 
-	retval = -ENOMEM;
-	if (devpts_pty_new(tty->link))
+	retval = devpts_pty_new(tty->link);
+	if (retval)
 		goto out1;
 
 	check_tty_count(tty, "tty_open");

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

* Re: [PATCH]: Propagate error code from devpts_pty_new
  2008-04-16 22:15 [PATCH]: Propagate error code from devpts_pty_new sukadev
@ 2008-04-17 15:37     ` Serge E. Hallyn
  0 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2008-04-17 15:37 UTC (permalink / raw)
  To: sukadev-r/Jw6+rmf7HQT0dZR+AlfA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Eric W. Biederman,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, Containers

Quoting sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org (sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> From: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Subject: [PATCH]: Propagate error code from devpts_pty_new
> 
> Have ptmx_open() propagate any error code returned by devpts_pty_new()
> (which returns either 0 or -ENOMEM anyway).
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Seems nice and non-contentuous.

Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

thanks,
-serge

> ---
>  drivers/char/tty_io.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:38:23.000000000 -0700
> +++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
> @@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
>  	filp->private_data = tty;
>  	file_move(filp, &tty->tty_files);
> 
> -	retval = -ENOMEM;
> -	if (devpts_pty_new(tty->link))
> +	retval = devpts_pty_new(tty->link);
> +	if (retval)
>  		goto out1;
> 
>  	check_tty_count(tty, "tty_open");

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

* Re: [PATCH]: Propagate error code from devpts_pty_new
@ 2008-04-17 15:37     ` Serge E. Hallyn
  0 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2008-04-17 15:37 UTC (permalink / raw)
  To: sukadev
  Cc: Andrew Morton, serue, Eric W. Biederman, hpa, Containers,
	linux-kernel

Quoting sukadev@us.ibm.com (sukadev@us.ibm.com):
> From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> Subject: [PATCH]: Propagate error code from devpts_pty_new
> 
> Have ptmx_open() propagate any error code returned by devpts_pty_new()
> (which returns either 0 or -ENOMEM anyway).
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>

Seems nice and non-contentuous.

Acked-by: Serge Hallyn <serue@us.ibm.com>

thanks,
-serge

> ---
>  drivers/char/tty_io.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:38:23.000000000 -0700
> +++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
> @@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
>  	filp->private_data = tty;
>  	file_move(filp, &tty->tty_files);
> 
> -	retval = -ENOMEM;
> -	if (devpts_pty_new(tty->link))
> +	retval = devpts_pty_new(tty->link);
> +	if (retval)
>  		goto out1;
> 
>  	check_tty_count(tty, "tty_open");

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

* Re: [PATCH]: Propagate error code from devpts_pty_new
  2008-04-17 15:37     ` Serge E. Hallyn
@ 2008-04-17 16:05         ` H. Peter Anvin
  -1 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2008-04-17 16:05 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Containers, Eric W. Biederman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Serge E. Hallyn wrote:
> Quoting sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org (sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
>> From: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>> Subject: [PATCH]: Propagate error code from devpts_pty_new
>>
>> Have ptmx_open() propagate any error code returned by devpts_pty_new()
>> (which returns either 0 or -ENOMEM anyway).
>>
>> Signed-off-by: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> 
> Seems nice and non-contentuous.
> 
> Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Acked-by: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>

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

* Re: [PATCH]: Propagate error code from devpts_pty_new
@ 2008-04-17 16:05         ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2008-04-17 16:05 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: sukadev, Andrew Morton, Eric W. Biederman, Containers,
	linux-kernel

Serge E. Hallyn wrote:
> Quoting sukadev@us.ibm.com (sukadev@us.ibm.com):
>> From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
>> Subject: [PATCH]: Propagate error code from devpts_pty_new
>>
>> Have ptmx_open() propagate any error code returned by devpts_pty_new()
>> (which returns either 0 or -ENOMEM anyway).
>>
>> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> 
> Seems nice and non-contentuous.
> 
> Acked-by: Serge Hallyn <serue@us.ibm.com>

Acked-by: H. Peter Anvin <hpa@zytor.com>

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

end of thread, other threads:[~2008-04-17 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16 22:15 [PATCH]: Propagate error code from devpts_pty_new sukadev
     [not found] ` <20080416221524.GA7112-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-04-17 15:37   ` Serge E. Hallyn
2008-04-17 15:37     ` Serge E. Hallyn
     [not found]     ` <20080417153748.GB14215-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-04-17 16:05       ` H. Peter Anvin
2008-04-17 16:05         ` H. Peter Anvin

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.