public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: sukadev@us.ibm.com
To: linux-kernel@vger.kernel.org
Cc: Containers <containers@lists.osdl.org>,
	clg@fr.ibm.com, Pavel Emelyanov <xemul@openvz.org>
Subject: [RFC][PATCH 1/7]: Propagate error code from devpts_pty_new
Date: Tue, 8 Apr 2008 14:58:18 -0700	[thread overview]
Message-ID: <20080408215818.GA9034@us.ibm.com> (raw)
In-Reply-To: <20080408215333.GA8799@us.ibm.com>


From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [RFC][PATCH 1/7]: 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-08 09:12:55.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");

  reply	other threads:[~2008-04-08 21:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08 21:53 [RFC][PATCH 0/7] Clone PTS namespace sukadev
2008-04-08 21:58 ` sukadev [this message]
2008-04-08 21:58 ` [RFC][PATCH 2/7]: Factor out PTY index allocation sukadev
2008-04-08 21:59 ` [RFC][PATCH 3/7]: Enable multiple mounts of /dev/pts sukadev
2008-04-08 21:59 ` [RFC][PATCH 4/7]: Allow mknod of ptmx and tty in devpts sukadev
2008-04-08 22:00 ` [RFC][PATCH 5/7]: Implement get_pts_ns() and put_pts_ns() sukadev
2008-04-08 22:00 ` [RFC][PATCH 6/7]: Determine pts_ns from a pty's inode sukadev
2008-04-08 22:00 ` [RFC][PATCH 7/7]: Enable cloning PTY namespaces sukadev
2008-04-09  0:53 ` [RFC][PATCH 0/7] Clone PTS namespace H. Peter Anvin
2008-04-09 16:23   ` sukadev
2008-04-09 18:01     ` H. Peter Anvin
2008-04-09 19:16       ` serge
2008-04-09 22:38         ` H. Peter Anvin
2008-04-09 22:15   ` Eric W. Biederman
2008-04-10  1:59     ` Serge E. Hallyn
2008-04-10  7:36       ` Eric W. Biederman
2008-04-10 16:44         ` Serge E. Hallyn
2008-04-10 20:58           ` sukadev
2008-04-22 14:25         ` Serge E. Hallyn
2008-04-22 18:53           ` Eric W. Biederman
2008-04-23 14:36             ` Serge E. Hallyn
2008-04-23 17:57               ` Serge E. Hallyn
2008-04-23 18:49                 ` Eric W. Biederman
2008-04-25 19:21                   ` Serge E. Hallyn
2008-04-25 19:47                     ` Eric W. Biederman
2008-04-26 13:02                       ` Serge E. Hallyn

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=20080408215818.GA9034@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox