When CONFIG_SECURITY_NETWORK_XFRM is undefined the following warnings appears:
net/xfrm/xfrm_user.c: In function 'xfrm_add_pol_expire':
net/xfrm/xfrm_user.c:1576: warning: 'ctx' may be used uninitialized in this function
net/xfrm/xfrm_user.c: In function 'xfrm_get_policy':
net/xfrm/xfrm_user.c:1340: warning: 'ctx' may be used uninitialized in this function
(security_xfrm_policy_alloc is noop for the case).
It seems that they are result of the commit
03e1ad7b5d871d4189b1da3125c2f12d1b5f7d0b
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
net/xfrm/xfrm_user.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index b822b56..1810f56 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1343,14 +1343,14 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
if (err)
return err;
+ ctx = NULL;
if (rt) {
struct xfrm_user_sec_ctx *uctx = nla_data(rt);
err = security_xfrm_policy_alloc(&ctx, uctx);
if (err)
return err;
- } else
- ctx = NULL;
+ }
xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx,
delete, &err);
security_xfrm_policy_free(ctx);
@@ -1579,14 +1579,14 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
if (err)
return err;
+ ctx = NULL;
if (rt) {
struct xfrm_user_sec_ctx *uctx = nla_data(rt);
err = security_xfrm_policy_alloc(&ctx, uctx);
if (err)
return err;
- } else
- ctx = NULL;
+ }
xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx, 0, &err);
security_xfrm_policy_free(ctx);
}
--
1.5.3.rc5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Alan Cox | [PATCH 00/76] Queued TTY Patches |
| Nick Piggin | [patch 1/6] mm: debug check for the fault vs invalidate race |
| Andi Kleen | [PATCH] [1/22] x86_64: dma_ops as const |
| Linus Torvalds | Linux 2.6.27-rc8 |
git: | |
| Jeff King | Re: What's cooking in git/spearce.git (topics) |
| Jeff King | Re: [RFC] origin link for cherry-pick and revert |
| Matt Seitz (matseitz) | Symbolic link documentation |
| Jon Smirl | Huge win, compressing a window of delta runs as a unit |
| Richard Stallman | Real men don't attack straw men |
| Leon Dippenaar | New tcp stack attack |
| Nuno Magalhães | Can't scp, ssh is slow to authenticate. |
| Brandon Lee | DELL PERC 5iR slow performance |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Denys Vlasenko | Re: bnx2 dirver's firmware images |
| Pavel Emelyanov | [PATCH 0/8] Cleanup/fix the sk_alloc() call |
| Kok, Auke | Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM |
