From 91c49d4f0b8f5bc2f5ce9816cde937d92a03d531 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 31 Oct 2007 16:47:19 +1100 Subject: [PATCH] --- yaml --- r: 73239 b: refs/heads/master c: 57002bfb31283e84f694763ed4db0fb761b7d6a9 h: refs/heads/master i: 73237: d70d1d14c9eabf2f3eee02f242516b8f70caf576 73235: b7f7fde278b83d7dba8e9df897012d62fe12de92 73231: 566e03e95b61b6dcfcc8620d5221b1cb979cf471 v: v3 --- [refs] | 2 +- trunk/arch/frv/mm/init.c | 2 +- trunk/security/selinux/xfrm.c | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 745b26fe5959..2281c6860482 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4fc5a1a2acab67867c9858cd4c8e9abb5b242f7 +refs/heads/master: 57002bfb31283e84f694763ed4db0fb761b7d6a9 diff --git a/trunk/arch/frv/mm/init.c b/trunk/arch/frv/mm/init.c index b841ecfd5d5a..4103c2c487f3 100644 --- a/trunk/arch/frv/mm/init.c +++ b/trunk/arch/frv/mm/init.c @@ -197,7 +197,7 @@ void __init mem_init(void) /* * free the memory that was only required for initialisation */ -void free_initmem(void) +void __init free_initmem(void) { #if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) unsigned long start, end, addr; diff --git a/trunk/security/selinux/xfrm.c b/trunk/security/selinux/xfrm.c index 36a191e7004e..e07603969033 100644 --- a/trunk/security/selinux/xfrm.c +++ b/trunk/security/selinux/xfrm.c @@ -211,26 +211,27 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX) return -EINVAL; - if (uctx->ctx_len >= PAGE_SIZE) + str_len = uctx->ctx_len; + if (str_len >= PAGE_SIZE) return -ENOMEM; *ctxp = ctx = kmalloc(sizeof(*ctx) + - uctx->ctx_len + 1, + str_len + 1, GFP_KERNEL); if (!ctx) return -ENOMEM; ctx->ctx_doi = uctx->ctx_doi; - ctx->ctx_len = uctx->ctx_len; + ctx->ctx_len = str_len; ctx->ctx_alg = uctx->ctx_alg; memcpy(ctx->ctx_str, uctx+1, - ctx->ctx_len); - ctx->ctx_str[ctx->ctx_len] = 0; + str_len); + ctx->ctx_str[str_len] = 0; rc = security_context_to_sid(ctx->ctx_str, - ctx->ctx_len, + str_len, &ctx->ctx_sid); if (rc)