CRED: fix build error due to 'tgcred' undeclared
PATCH 1/1 CRED: fix build error due to 'tgcred' undeclared
This patch adds CONFIG_KEYS guard for tgcred to fix below build error if CONFIG_KEYS is not configured.
CC kernel/cred.okernel/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
--- kernel/cred.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/cred.c +2 -0
@@ -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);
Signature · 1 line
1.7.4.1
Quoted 11 lines · Axel Lin
This patch adds
CONFIG_KEYSguard for tgcred to fix below build error ifCONFIG_KEYSis not configured.CC
kernel/cred.okernel/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 oncekernel/cred.c:657: error: for each function it appears in.) make[1]: *** [kernel/cred.o] Error 1
make: *** [kernel] Error 2
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>
James: do you want me to reissue my patches?
Quoted 13 lines · David Howells
Quoted 11 lines · Axel Lin
This patch adds
CONFIG_KEYSguard for tgcred to fix below build error ifCONFIG_KEYSis not configured.CC
kernel/cred.okernel/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 oncekernel/cred.c:657: error: for each function it appears in.) make[1]: *** [kernel/cred.o] Error 1
make: *** [kernel] Error 2
Quoted 3 lines
Quoted 1 line
Signed-off-by Axel Lin <[email protected]>Acked-by David Howells <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Quoted 2 lines
James: do you want me to reissue my patches?
Nope, I needed a differential patch as I'd already pushed that branch out.
Thanks.
Signature · 2 lines
James Morris <[email protected]>