]> err.no Git - linux-2.6/blobdiff - net/netlabel/netlabel_unlabeled.c
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/pasem...
[linux-2.6] / net / netlabel / netlabel_unlabeled.c
index 5bc37181662e5e0a51281093c08d590c199cac2e..348292450deb7ea7ccea3627160f4f4f457c98c1 100644 (file)
@@ -61,7 +61,7 @@ static struct genl_family netlbl_unlabel_gnl_family = {
 };
 
 /* NetLabel Netlink attribute policy */
-static struct nla_policy netlbl_unlabel_genl_policy[NLBL_UNLABEL_A_MAX + 1] = {
+static const struct nla_policy netlbl_unlabel_genl_policy[NLBL_UNLABEL_A_MAX + 1] = {
        [NLBL_UNLABEL_A_ACPTFLG] = { .type = NLA_U8 },
 };
 
@@ -84,12 +84,10 @@ static void netlbl_unlabel_acceptflg_set(u8 value,
        struct audit_buffer *audit_buf;
        u8 old_val;
 
-       rcu_read_lock();
-       old_val = netlabel_unlabel_acceptflg;
        spin_lock(&netlabel_unlabel_acceptflg_lock);
+       old_val = netlabel_unlabel_acceptflg;
        netlabel_unlabel_acceptflg = value;
        spin_unlock(&netlabel_unlabel_acceptflg_lock);
-       rcu_read_unlock();
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_ALLOW,
                                              audit_info);
@@ -173,7 +171,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info)
        return 0;
 
 list_failure:
-       kfree(ans_skb);
+       kfree_skb(ans_skb);
        return ret_val;
 }