]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/nfnetlink_log.c
[PKT_SCHED] netem: packet corruption option
[linux-2.6-omap-h63xx.git] / net / netfilter / nfnetlink_log.c
index efcd10f996ba516294f5e607c72a0268bd0ce808..cba63729313d5690ccc724c505e8d967ac544618 100644 (file)
@@ -146,11 +146,10 @@ instance_create(u_int16_t group_num, int pid)
                goto out_unlock;
        }
 
-       inst = kmalloc(sizeof(*inst), GFP_ATOMIC);
+       inst = kzalloc(sizeof(*inst), GFP_ATOMIC);
        if (!inst)
                goto out_unlock;
 
-       memset(inst, 0, sizeof(*inst));
        INIT_HLIST_NODE(&inst->hlist);
        inst->lock = SPIN_LOCK_UNLOCKED;
        /* needs to be two, since we _put() after creation */
@@ -863,11 +862,9 @@ out_put:
 
 static struct nfnl_callback nfulnl_cb[NFULNL_MSG_MAX] = {
        [NFULNL_MSG_PACKET]     = { .call = nfulnl_recv_unsupp,
-                                   .attr_count = NFULA_MAX,
-                                   .cap_required = CAP_NET_ADMIN, },
+                                   .attr_count = NFULA_MAX, },
        [NFULNL_MSG_CONFIG]     = { .call = nfulnl_recv_config,
-                                   .attr_count = NFULA_CFG_MAX,
-                                   .cap_required = CAP_NET_ADMIN },
+                                   .attr_count = NFULA_CFG_MAX, },
 };
 
 static struct nfnetlink_subsystem nfulnl_subsys = {
@@ -962,10 +959,9 @@ static int nful_open(struct inode *inode, struct file *file)
        struct iter_state *is;
        int ret;
 
-       is = kmalloc(sizeof(*is), GFP_KERNEL);
+       is = kzalloc(sizeof(*is), GFP_KERNEL);
        if (!is)
                return -ENOMEM;
-       memset(is, 0, sizeof(*is));
        ret = seq_open(file, &nful_seq_ops);
        if (ret < 0)
                goto out_free;