summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c8
-rw-r--r--net/core/drop_monitor.c2
-rw-r--r--net/core/failover.c2
-rw-r--r--net/core/filter.c4
-rw-r--r--net/core/flow_offload.c6
-rw-r--r--net/core/gen_estimator.c2
-rw-r--r--net/core/net_namespace.c2
-rw-r--r--net/core/netclassid_cgroup.c2
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/core/netprio_cgroup.c2
-rw-r--r--net/core/rtnetlink.c4
-rw-r--r--net/core/selftests.c2
-rw-r--r--net/core/sock.c2
-rw-r--r--net/core/xdp.c2
14 files changed, 21 insertions, 21 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 525cf5952101..b91aabb18bbe 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -273,7 +273,7 @@ static struct netdev_name_node *netdev_name_node_alloc(struct net_device *dev,
{
struct netdev_name_node *name_node;
- name_node = kmalloc_obj(*name_node, GFP_KERNEL);
+ name_node = kmalloc_obj(*name_node);
if (!name_node)
return NULL;
INIT_HLIST_NODE(&name_node->hlist);
@@ -8693,7 +8693,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev,
return 0;
}
- adj = kmalloc_obj(*adj, GFP_KERNEL);
+ adj = kmalloc_obj(*adj);
if (!adj)
return -ENOMEM;
@@ -11940,7 +11940,7 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
#ifdef CONFIG_NET_CLS_ACT
if (queue)
return queue;
- queue = kzalloc_obj(*queue, GFP_KERNEL);
+ queue = kzalloc_obj(*queue);
if (!queue)
return NULL;
netdev_init_one_queue(dev, queue, NULL);
@@ -12857,7 +12857,7 @@ static struct hlist_head * __net_init netdev_create_hash(void)
int i;
struct hlist_head *hash;
- hash = kmalloc_objs(*hash, NETDEV_HASHENTRIES, GFP_KERNEL);
+ hash = kmalloc_objs(*hash, NETDEV_HASHENTRIES);
if (hash != NULL)
for (i = 0; i < NETDEV_HASHENTRIES; i++)
INIT_HLIST_HEAD(&hash[i]);
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index 99f9d4dfb866..da0d231e1952 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -1583,7 +1583,7 @@ static int dropmon_net_event(struct notifier_block *ev_block,
case NETDEV_REGISTER:
if (WARN_ON_ONCE(rtnl_dereference(dev->dm_private)))
break;
- stat = kzalloc_obj(*stat, GFP_KERNEL);
+ stat = kzalloc_obj(*stat);
if (!stat)
break;
diff --git a/net/core/failover.c b/net/core/failover.c
index fcc04e6995d0..0eb2e0ec875b 100644
--- a/net/core/failover.c
+++ b/net/core/failover.c
@@ -247,7 +247,7 @@ struct failover *failover_register(struct net_device *dev,
if (dev->type != ARPHRD_ETHER)
return ERR_PTR(-EINVAL);
- failover = kzalloc_obj(*failover, GFP_KERNEL);
+ failover = kzalloc_obj(*failover);
if (!failover)
return ERR_PTR(-ENOMEM);
diff --git a/net/core/filter.c b/net/core/filter.c
index 6957d3449f2c..0d5d5a17acb2 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1161,7 +1161,7 @@ static int bpf_prog_store_orig_filter(struct bpf_prog *fp,
unsigned int fsize = bpf_classic_proglen(fprog);
struct sock_fprog_kern *fkprog;
- fp->orig_prog = kmalloc_obj(*fkprog, GFP_KERNEL);
+ fp->orig_prog = kmalloc_obj(*fkprog);
if (!fp->orig_prog)
return -ENOMEM;
@@ -1481,7 +1481,7 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
{
struct sk_filter *fp, *old_fp;
- fp = kmalloc_obj(*fp, GFP_KERNEL);
+ fp = kmalloc_obj(*fp);
if (!fp)
return -ENOMEM;
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index 630f94e2c2c1..c55bf9d5ac8c 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -263,7 +263,7 @@ struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb,
{
struct flow_block_cb *block_cb;
- block_cb = kzalloc_obj(*block_cb, GFP_KERNEL);
+ block_cb = kzalloc_obj(*block_cb);
if (!block_cb)
return ERR_PTR(-ENOMEM);
@@ -390,7 +390,7 @@ static struct flow_indr_dev *flow_indr_dev_alloc(flow_indr_block_bind_cb_t *cb,
{
struct flow_indr_dev *indr_dev;
- indr_dev = kmalloc_obj(*indr_dev, GFP_KERNEL);
+ indr_dev = kmalloc_obj(*indr_dev);
if (!indr_dev)
return NULL;
@@ -570,7 +570,7 @@ static int indir_dev_add(void *data, struct net_device *dev, struct Qdisc *sch,
if (info)
return -EEXIST;
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 64d0d55fa2b2..c34e58c6c3e6 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -154,7 +154,7 @@ int gen_new_estimator(struct gnet_stats_basic_sync *bstats,
if (parm->ewma_log == 0 || parm->ewma_log >= 31)
return -EINVAL;
- est = kzalloc_obj(*est, GFP_KERNEL);
+ est = kzalloc_obj(*est);
if (!est)
return -ENOBUFS;
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 7a040a9233e7..1057d16d5dd2 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -492,7 +492,7 @@ static struct net *net_alloc(void)
goto out_free;
#ifdef CONFIG_KEYS
- net->key_domain = kzalloc_obj(struct key_tag, GFP_KERNEL);
+ net->key_domain = kzalloc_obj(struct key_tag);
if (!net->key_domain)
goto out_free_2;
refcount_set(&net->key_domain->usage, 1);
diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
index 9267880a0a17..e1e30f0b60cd 100644
--- a/net/core/netclassid_cgroup.c
+++ b/net/core/netclassid_cgroup.c
@@ -32,7 +32,7 @@ cgrp_css_alloc(struct cgroup_subsys_state *parent_css)
{
struct cgroup_cls_state *cs;
- cs = kzalloc_obj(*cs, GFP_KERNEL);
+ cs = kzalloc_obj(*cs);
if (!cs)
return ERR_PTR(-ENOMEM);
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 70e458893ea5..a8558a52884f 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -565,7 +565,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
npinfo = rtnl_dereference(ndev->npinfo);
if (!npinfo) {
- npinfo = kmalloc_obj(*npinfo, GFP_KERNEL);
+ npinfo = kmalloc_obj(*npinfo);
if (!npinfo) {
err = -ENOMEM;
goto out;
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index fb3cd2886e1f..76c33ab44761 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -135,7 +135,7 @@ cgrp_css_alloc(struct cgroup_subsys_state *parent_css)
{
struct cgroup_subsys_state *css;
- css = kzalloc_obj(*css, GFP_KERNEL);
+ css = kzalloc_obj(*css);
if (!css)
return ERR_PTR(-ENOMEM);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index da268fc45356..dad4b1054955 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -414,7 +414,7 @@ static int rtnl_register_internal(struct module *owner,
if (!link)
goto unlock;
} else {
- link = kzalloc_obj(*link, GFP_KERNEL);
+ link = kzalloc_obj(*link);
if (!link)
goto unlock;
}
@@ -3969,7 +3969,7 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
int ops_srcu_index;
int ret;
- tbs = kmalloc_obj(*tbs, GFP_KERNEL);
+ tbs = kmalloc_obj(*tbs);
if (!tbs)
return -ENOMEM;
diff --git a/net/core/selftests.c b/net/core/selftests.c
index 248112bd51a8..0a203d3fb9dc 100644
--- a/net/core/selftests.c
+++ b/net/core/selftests.c
@@ -237,7 +237,7 @@ static int __net_test_loopback(struct net_device *ndev,
struct sk_buff *skb = NULL;
int ret = 0;
- tpriv = kzalloc_obj(*tpriv, GFP_KERNEL);
+ tpriv = kzalloc_obj(*tpriv);
if (!tpriv)
return -ENOMEM;
diff --git a/net/core/sock.c b/net/core/sock.c
index b62e509e06d9..5976100a9d55 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1097,7 +1097,7 @@ sock_devmem_dontneed(struct sock *sk, sockptr_t optval, unsigned int optlen)
return -EINVAL;
num_tokens = optlen / sizeof(*tokens);
- tokens = kvmalloc_objs(*tokens, num_tokens, GFP_KERNEL);
+ tokens = kvmalloc_objs(*tokens, num_tokens);
if (!tokens)
return -ENOMEM;
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 8c65d7dafd89..9890a30584ba 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -214,7 +214,7 @@ static int __mem_id_init_hash_table(void)
if (unlikely(mem_id_init))
return 0;
- rht = kzalloc_obj(*rht, GFP_KERNEL);
+ rht = kzalloc_obj(*rht);
if (!rht)
return -ENOMEM;