[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100330225622.607090805@linux.site>
Date: Tue, 30 Mar 2010 15:55:16 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
André Goddard Rosa
<andre.goddard@...il.com>, Al Viro <viro@...iv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [038/116] mqueue: fix mq_open() file descriptor leak on user-space processes
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: André Goddard Rosa <andre.goddard@...il.com>
commit 4294a8eedb17bbc45e1e7447c2a4d05332943248 upstream.
We leak fd on lookup_one_len() failure
Signed-off-by: André Goddard Rosa <andre.goddard@...il.com>
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
ipc/mqueue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -706,7 +706,7 @@ SYSCALL_DEFINE4(mq_open, const char __us
dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name));
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
- goto out_err;
+ goto out_putfd;
}
mntget(ipc_ns->mq_mnt);
@@ -744,7 +744,6 @@ out:
mntput(ipc_ns->mq_mnt);
out_putfd:
put_unused_fd(fd);
-out_err:
fd = error;
out_upsem:
mutex_unlock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists