All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CRED: fix build error due to 'tgcred' undeclared
@ 2011-08-23  7:23 Axel Lin
  2011-08-23  7:36 ` David Howells
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-08-23  7:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Howells, James Morris, Serge E. Hallyn, Andrew Morton,
	Eric W. Biederman

This patch adds CONFIG_KEYS guard for tgcred to fix below build error
if CONFIG_KEYS is not configured.

  CC      kernel/cred.o
kernel/cred.c: In function 'prepare_kernel_cred':
kernel/cred.c:657: error: 'tgcred' undeclared (first use in this function)
kernel/cred.c:657: error: (Each undeclared identifier is reported only once
kernel/cred.c:657: error: for each function it appears in.)
make[1]: *** [kernel/cred.o] Error 1
make: *** [kernel] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 kernel/cred.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/cred.c b/kernel/cred.c
index bb2c0f5..5791612 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -654,11 +654,13 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
 	if (!new)
 		return NULL;
 
+#ifdef CONFIG_KEYS
 	tgcred = kmalloc(sizeof(*tgcred), GFP_KERNEL);
 	if (!tgcred) {
 		kmem_cache_free(cred_jar, new);
 		return NULL;
 	}
+#endif
 
 	kdebug("prepare_kernel_cred() alloc %p", new);
 
-- 
1.7.4.1




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

* Re: [PATCH] CRED: fix build error due to 'tgcred' undeclared
  2011-08-23  7:23 [PATCH] CRED: fix build error due to 'tgcred' undeclared Axel Lin
@ 2011-08-23  7:36 ` David Howells
  2011-08-23  8:24   ` James Morris
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2011-08-23  7:36 UTC (permalink / raw)
  To: Axel Lin
  Cc: dhowells, linux-kernel, James Morris, Serge E. Hallyn,
	Andrew Morton, Eric W. Biederman

Axel Lin <axel.lin@gmail.com> wrote:

> This patch adds CONFIG_KEYS guard for tgcred to fix below build error
> if CONFIG_KEYS is not configured.
> 
>   CC      kernel/cred.o
> kernel/cred.c: In function 'prepare_kernel_cred':
> kernel/cred.c:657: error: 'tgcred' undeclared (first use in this function)
> kernel/cred.c:657: error: (Each undeclared identifier is reported only once
> kernel/cred.c:657: error: for each function it appears in.)
> make[1]: *** [kernel/cred.o] Error 1
> make: *** [kernel] Error 2
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: David Howells <dhowells@redhat.com>

James: do you want me to reissue my patches?

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

* Re: [PATCH] CRED: fix build error due to 'tgcred' undeclared
  2011-08-23  7:36 ` David Howells
@ 2011-08-23  8:24   ` James Morris
  0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2011-08-23  8:24 UTC (permalink / raw)
  To: David Howells
  Cc: Axel Lin, linux-kernel, Serge E. Hallyn, Andrew Morton,
	Eric W. Biederman

On Tue, 23 Aug 2011, David Howells wrote:

> Axel Lin <axel.lin@gmail.com> wrote:
> 
> > This patch adds CONFIG_KEYS guard for tgcred to fix below build error
> > if CONFIG_KEYS is not configured.
> > 
> >   CC      kernel/cred.o
> > kernel/cred.c: In function 'prepare_kernel_cred':
> > kernel/cred.c:657: error: 'tgcred' undeclared (first use in this function)
> > kernel/cred.c:657: error: (Each undeclared identifier is reported only once
> > kernel/cred.c:657: error: for each function it appears in.)
> > make[1]: *** [kernel/cred.o] Error 1
> > make: *** [kernel] Error 2
> > 
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> 
> Acked-by: David Howells <dhowells@redhat.com>

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

> James: do you want me to reissue my patches?
> 

Nope, I needed a differential patch as I'd already pushed that branch out.

Thanks.


-- 
James Morris
<jmorris@namei.org>

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

end of thread, other threads:[~2011-08-23  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23  7:23 [PATCH] CRED: fix build error due to 'tgcred' undeclared Axel Lin
2011-08-23  7:36 ` David Howells
2011-08-23  8:24   ` James Morris

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.