login
Header Space

 
 

[PATCH 1/4]: Propagate error code from devpts_pty_new

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <serue@...>, <matthltc@...>, Eric W. Biederman <ebiederm@...>, <hpa@...>, Pavel Emelyanov <xemul@...>, Containers <containers@...>, <linux-kernel@...>
Date: Saturday, April 12, 2008 - 1:32 pm

From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH 1/4]: 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-mm1/drivers/char/tty_io.c
===================================================================
--- 2.6.25-rc8-mm1.orig/drivers/char/tty_io.c	2008-04-07 14:49:56.000000000 -0700
+++ 2.6.25-rc8-mm1/drivers/char/tty_io.c	2008-04-09 13:54:00.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");
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/4] Helper patches for PTY namespaces, Eric W. Biederman, (Sat Apr 12, 3:06 pm)
Per-instance devpts, H. Peter Anvin, (Fri Aug 1, 2:12 pm)
Re: Per-instance devpts, , (Sun Aug 3, 1:08 am)
Re: Per-instance devpts, Alan Cox, (Sun Aug 3, 8:04 am)
Re: Per-instance devpts, , (Sun Aug 3, 1:46 pm)
Re: Per-instance devpts, Alan Cox, (Sun Aug 3, 1:54 pm)
Re: Per-instance devpts, H. Peter Anvin, (Sun Aug 3, 7:31 am)
Re: Per-instance devpts, Bastian Blank, (Sat Aug 2, 4:54 am)
Re: Per-instance devpts, Dave Hansen, (Fri Aug 1, 3:23 pm)
Re: Per-instance devpts, H. Peter Anvin, (Fri Aug 1, 3:37 pm)
Re: Per-instance devpts, Al Viro, (Fri Aug 1, 3:35 pm)
Re: [PATCH 0/4] Helper patches for PTY namespaces, Serge E. Hallyn, (Sat Apr 12, 8:59 pm)
Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 2:54 pm)
Re: Multiple instances of devpts, Eric W. Biederman, (Sat Apr 12, 3:15 pm)
Re: Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 3:24 pm)
Re: Multiple instances of devpts, H. Peter Anvin, (Sat Apr 12, 3:30 pm)
Re: [PATCH 0/4] Helper patches for PTY namespaces, H. Peter Anvin, (Sat Apr 12, 2:09 pm)
[PATCH 1/4]: Propagate error code from devpts_pty_new, , (Sat Apr 12, 1:32 pm)
speck-geostationary