Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[deliverable/linux.git] / net / xfrm / xfrm_policy.c
index 157bfbd250ba62f2c451805106b25a1f13b581bf..e5a3be03aa0d0afb50dcfd886aeb4127d04badd7 100644 (file)
@@ -857,7 +857,7 @@ xfrm_policy_flush_secctx_check(u8 type, struct xfrm_audit *audit_info)
                                               pol, NULL);
                                return err;
                        }
-                }
+               }
                for (i = xfrm_policy_bydst[dir].hmask; i >= 0; i--) {
                        hlist_for_each_entry(pol, entry,
                                             xfrm_policy_bydst[dir].table + i,
@@ -1299,7 +1299,8 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl,
                xfrm_address_t *local  = saddr;
                struct xfrm_tmpl *tmpl = &policy->xfrm_vec[i];
 
-               if (tmpl->mode == XFRM_MODE_TUNNEL) {
+               if (tmpl->mode == XFRM_MODE_TUNNEL ||
+                   tmpl->mode == XFRM_MODE_BEET) {
                        remote = &tmpl->id.daddr;
                        local = &tmpl->saddr;
                        family = tmpl->encap_family;
@@ -2141,7 +2142,7 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
                if (last == first)
                        break;
 
-               last = last->u.next;
+               last = (struct xfrm_dst *)last->u.dst.next;
                last->child_mtu_cached = mtu;
        }
 
@@ -2194,9 +2195,10 @@ void xfrm_audit_log(uid_t auid, u32 sid, int type, int result,
        }
 
        if (sid != 0 &&
-               security_secid_to_secctx(sid, &secctx, &secctx_len) == 0)
+           security_secid_to_secctx(sid, &secctx, &secctx_len) == 0) {
                audit_log_format(audit_buf, " subj=%s", secctx);
-       else
+               security_release_secctx(secctx, secctx_len);
+       } else
                audit_log_task_context(audit_buf);
 
        if (xp) {
@@ -2378,7 +2380,7 @@ static void __init xfrm_policy_init(void)
        xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache",
                                           sizeof(struct xfrm_dst),
                                           0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
-                                          NULL, NULL);
+                                          NULL);
 
        hmask = 8 - 1;
        sz = (hmask+1) * sizeof(struct hlist_head);
This page took 0.027914 seconds and 5 git commands to generate.