linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: creds tree build failure
@ 2008-08-08  6:36 Stephen Rothwell
  2008-08-08  7:34 ` David Howells
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2008-08-08  6:36 UTC (permalink / raw)
  To: David Howells, James Morris; +Cc: linux-next

Hi David,

Today's linux-next build (powerpc ppc64_defconfig) failed like this:

arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_context_open':
arch/powerpc/platforms/cell/spufs/inode.c:326: error: too few arguments to function 'dentry_open'
arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_gang_open':
arch/powerpc/platforms/cell/spufs/inode.c:563: error: too few arguments to function 'dentry_open'
kernel/cred.c:71: warning: 'struct thread_group_cred' declared inside parameter list
kernel/cred.c:71: warning: its scope is only this definition or declaration, which is probably not what you want
kernel/cred.c: In function 'put_cred_rcu':
kernel/cred.c:93: error: 'struct cred' has no member named 'tgcred'
kernel/cred.c: In function 'copy_creds':
kernel/cred.c:291: error: 'const struct cred' has no member named 'thread_keyring'
kernel/cred.c:286: warning: unused variable 'tgcred'

I applied the following (almost certainly wrong) patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

>From e963c9f33fae20e19f5b97bf512c41b07199def4 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 8 Aug 2008 16:26:19 +1000
Subject: [PATCH] creds: build fixes 1

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/cell/spufs/inode.c |    5 +++--
 kernel/cred.c                             |   12 ++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 60bd5ed..80f4506 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -34,6 +34,7 @@
 #include <linux/poll.h>
 #include <linux/slab.h>
 #include <linux/parser.h>
+#include <linux/cred.h>
 
 #include <asm/prom.h>
 #include <asm/spu.h>
@@ -323,7 +324,7 @@ static int spufs_context_open(struct dentry *dentry, struct vfsmount *mnt)
 		goto out;
 	}
 
-	filp = dentry_open(dentry, mnt, O_RDONLY);
+	filp = dentry_open(dentry, mnt, O_RDONLY, current_cred());
 	if (IS_ERR(filp)) {
 		put_unused_fd(ret);
 		ret = PTR_ERR(filp);
@@ -560,7 +561,7 @@ static int spufs_gang_open(struct dentry *dentry, struct vfsmount *mnt)
 		goto out;
 	}
 
-	filp = dentry_open(dentry, mnt, O_RDONLY);
+	filp = dentry_open(dentry, mnt, O_RDONLY, current_cred());
 	if (IS_ERR(filp)) {
 		put_unused_fd(ret);
 		ret = PTR_ERR(filp);
diff --git a/kernel/cred.c b/kernel/cred.c
index 6e9cfbf..f89c5e5 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -65,16 +65,18 @@ static void put_tgcred_rcu(struct rcu_head *rcu)
 }
 #endif
 
+#ifdef CONFIG_KEYS
 /*
  * Release a set of thread group credentials.
  */
 void put_tgcred(struct thread_group_cred *tgcred)
 {
-#ifdef CONFIG_KEYS
 	if (atomic_dec_and_test(&tgcred->usage))
 		call_rcu(&tgcred->rcu, put_tgcred_rcu);
-#endif
 }
+#else
+#define put_tgcred(t)
+#endif
 
 /*
  * The RCU callback to actually dispose of a set of credentials
@@ -283,12 +285,18 @@ error:
  */
 int copy_creds(struct task_struct *p, unsigned long clone_flags)
 {
+#ifdef CONFIG_KEYS
 	struct thread_group_cred *tgcred;
+#endif
 	struct cred *new;
 
 	mutex_init(&p->cred_exec_mutex);
 
+#ifdef CONFIG_KEYS
 	if (!p->cred->thread_keyring && clone_flags & CLONE_THREAD) {
+#else
+	if (clone_flags & CLONE_THREAD) {
+#endif
 		p->real_cred = get_cred(p->cred);
 		get_cred(p->cred);
 		return 0;
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* linux-next: creds tree build failure
@ 2008-10-17  6:25 Stephen Rothwell
  2008-10-17  7:36 ` James Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Stephen Rothwell @ 2008-10-17  6:25 UTC (permalink / raw)
  To: David Howells, James Morris; +Cc: linux-next, Ian Kent, Andrew Morton

Hi David,

Today's linux-next build (powerpc_ppc64_defconfig) failed like this:

fs/autofs4/dev-ioctl.c: In function 'autofs_dev_ioctl_open_mountpoint':
fs/autofs4/dev-ioctl.c:310: error: too few arguments to function 'dentry_open'

Commit 8d7b48e0bc5fa01a818eac713d4cb0763090cd0e ("autofs4: add
miscellaneous device for ioctls") added this file and interacts with
commit 327a669334991cb9d42e7eddf771fd760721fbf8 ("CRED: Pass credentials
through dentry_open()") from the creds tree.

I applied the following patch (which may not be correct).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 17 Oct 2008 17:23:07 +1100
Subject: [PATCH] creds: autofs4 needs updating for dentry_open change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/autofs4/dev-ioctl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 625abf5..3c299be 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -288,6 +288,7 @@ static int autofs_dev_ioctl_open_mountpoint(const char *path, dev_t devid)
 	struct file *filp;
 	struct nameidata nd;
 	int err, fd;
+	const struct cred *cred = current_cred();
 
 	fd = get_unused_fd();
 	if (likely(fd >= 0)) {
@@ -307,7 +308,8 @@ static int autofs_dev_ioctl_open_mountpoint(const char *path, dev_t devid)
 			goto out;
 		}
 
-		filp = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY);
+		filp = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY,
+			cred);
 		if (IS_ERR(filp)) {
 			err = PTR_ERR(filp);
 			goto out;
-- 
1.5.6.5

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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08  6:36 linux-next: creds tree build failure Stephen Rothwell
2008-08-08  7:34 ` David Howells
2008-08-08 10:58   ` James Morris
  -- strict thread matches above, loose matches on Subject: below --
2008-10-17  6:25 Stephen Rothwell
2008-10-17  7:36 ` James Morris
2008-10-17  7:56   ` Stephen Rothwell
2008-10-17 10:37 ` David Howells
2008-10-17 10:55   ` Stephen Rothwell
2008-10-17 11:26 ` Ian Kent
2008-10-17 11:34   ` David Howells
2008-10-17 11:38     ` Ian Kent
2008-10-17 16:17       ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).