All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] devpts: Must release s_umount on error
@ 2009-01-29  6:33 Sukadev Bhattiprolu
       [not found] ` <20090129063330.GB22898-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Sukadev Bhattiprolu @ 2009-01-29  6:33 UTC (permalink / raw)
  To: Alan Cox, hpa, hch
  Cc: serue, David C. Hansen, Containers, linux-kernel, sukadev


From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date: Wed, 28 Jan 2009 16:57:12 -0800
Subject: [RFC][PATCH] devpts: Must release s_umount on error

We should drop the ->s_umount mutex if an error occurs after the
sget()/grab_super() call. This was introduced when adding support
for multiple instances of devpts and noticed during a code review/reorg.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
 fs/devpts/inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index d008105..ad186b4 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -390,6 +390,7 @@ static int new_pts_mount(struct file_system_type *fs_type, int flags,
 
 fail:
 	dput(mnt->mnt_sb->s_root);
+	up_write(&mnt->mnt_sb->s_umount);
 	deactivate_super(mnt->mnt_sb);
 	return err;
 }
@@ -479,6 +480,7 @@ static int init_pts_mount(struct file_system_type *fs_type, int flags,
 	err = mknod_ptmx(mnt->mnt_sb);
 	if (err) {
 		dput(mnt->mnt_sb->s_root);
+		up_write(&mnt->mnt_sb->s_umount);
 		deactivate_super(mnt->mnt_sb);
 	}
 
-- 
1.5.2.5

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

* Re: [RFC][PATCH] devpts: Must release s_umount on error
  2009-01-29  6:33 [RFC][PATCH] devpts: Must release s_umount on error Sukadev Bhattiprolu
@ 2009-02-01 16:33     ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2009-02-01 16:33 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: David C. Hansen, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, Containers, hch-jcswGhMUV9g, Alan Cox

On Wed, Jan 28, 2009 at 10:33:30PM -0800, Sukadev Bhattiprolu wrote:
> 
> From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> Date: Wed, 28 Jan 2009 16:57:12 -0800
> Subject: [RFC][PATCH] devpts: Must release s_umount on error
> 
> We should drop the ->s_umount mutex if an error occurs after the
> sget()/grab_super() call. This was introduced when adding support
> for multiple instances of devpts and noticed during a code review/reorg.

Looks good and should probably be submitted for 2.6.29.

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

* Re: [RFC][PATCH] devpts: Must release s_umount on error
@ 2009-02-01 16:33     ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2009-02-01 16:33 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Alan Cox, hpa, hch, serue, David C. Hansen, Containers,
	linux-kernel, sukadev

On Wed, Jan 28, 2009 at 10:33:30PM -0800, Sukadev Bhattiprolu wrote:
> 
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Date: Wed, 28 Jan 2009 16:57:12 -0800
> Subject: [RFC][PATCH] devpts: Must release s_umount on error
> 
> We should drop the ->s_umount mutex if an error occurs after the
> sget()/grab_super() call. This was introduced when adding support
> for multiple instances of devpts and noticed during a code review/reorg.

Looks good and should probably be submitted for 2.6.29.


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

end of thread, other threads:[~2009-02-01 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29  6:33 [RFC][PATCH] devpts: Must release s_umount on error Sukadev Bhattiprolu
     [not found] ` <20090129063330.GB22898-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-02-01 16:33   ` Christoph Hellwig
2009-02-01 16:33     ` Christoph Hellwig

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.