#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/bitops.h>
+#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
}
*err = -ENOMEM;
- a = kzalloc(sizeof(*a), GFP_KERNEL);
+ a = kmalloc(sizeof(*a), GFP_KERNEL);
if (a == NULL)
goto err_mod;
+ memset(a, 0, sizeof(*a));
/* backward compatibility for policer */
if (name == NULL)
index = *(int *)RTA_DATA(tb[TCA_ACT_INDEX - 1]);
*err = -ENOMEM;
- a = kzalloc(sizeof(struct tc_action), GFP_KERNEL);
+ a = kmalloc(sizeof(struct tc_action), GFP_KERNEL);
if (a == NULL)
return NULL;
+ memset(a, 0, sizeof(struct tc_action));
*err = -EINVAL;
a->ops = tc_lookup_action(tb[TCA_ACT_KIND - 1]);
{
struct tc_action *act;
- act = kzalloc(sizeof(*act), GFP_KERNEL);
+ act = kmalloc(sizeof(*act), GFP_KERNEL);
if (act == NULL) {
printk("create_a: failed to alloc!\n");
return NULL;
}
+ memset(act, 0, sizeof(*act));
act->order = i;
return act;
}