diff options
Diffstat (limited to 'drivers/net/vxlan')
| -rw-r--r-- | drivers/net/vxlan/vxlan_core.c | 6 | ||||
| -rw-r--r-- | drivers/net/vxlan/vxlan_mdb.c | 10 | ||||
| -rw-r--r-- | drivers/net/vxlan/vxlan_vnifilter.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 7bd0ae0a6a33..c1cf3eff4c1b 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -580,7 +580,7 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, if (rd) return 0; - rd = kmalloc(sizeof(*rd), GFP_ATOMIC); + rd = kmalloc_obj(*rd, GFP_ATOMIC); if (rd == NULL) return -ENOMEM; @@ -774,7 +774,7 @@ static struct vxlan_fdb *vxlan_fdb_alloc(struct vxlan_dev *vxlan, const u8 *mac, { struct vxlan_fdb *f; - f = kmalloc(sizeof(*f), GFP_ATOMIC); + f = kmalloc_obj(*f, GFP_ATOMIC); if (!f) return NULL; memset(&f->key, 0, sizeof(f->key)); @@ -3578,7 +3578,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, bool ipv6, ASSERT_RTNL(); - vs = kzalloc(sizeof(*vs), GFP_KERNEL); + vs = kzalloc_obj(*vs, GFP_KERNEL); if (!vs) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/vxlan/vxlan_mdb.c b/drivers/net/vxlan/vxlan_mdb.c index 816ab1aa0526..8f53ae776613 100644 --- a/drivers/net/vxlan/vxlan_mdb.c +++ b/drivers/net/vxlan/vxlan_mdb.c @@ -430,7 +430,7 @@ static int vxlan_mdb_config_src_entry_init(struct vxlan_mdb_config *cfg, extack)) return -EINVAL; - src = kzalloc(sizeof(*src), GFP_KERNEL); + src = kzalloc_obj(*src, GFP_KERNEL); if (!src) return -ENOMEM; @@ -697,7 +697,7 @@ static int vxlan_mdb_remote_rdst_init(const struct vxlan_mdb_config *cfg, struct vxlan_rdst *rd; int err; - rd = kzalloc(sizeof(*rd), GFP_KERNEL); + rd = kzalloc_obj(*rd, GFP_KERNEL); if (!rd) return -ENOMEM; @@ -767,7 +767,7 @@ vxlan_mdb_remote_src_entry_add(struct vxlan_mdb_remote *remote, { struct vxlan_mdb_src_entry *ent; - ent = kzalloc(sizeof(*ent), GFP_KERNEL); + ent = kzalloc_obj(*ent, GFP_KERNEL); if (!ent) return NULL; @@ -1139,7 +1139,7 @@ static int vxlan_mdb_remote_add(const struct vxlan_mdb_config *cfg, return -ENOENT; } - remote = kzalloc(sizeof(*remote), GFP_KERNEL); + remote = kzalloc_obj(*remote, GFP_KERNEL); if (!remote) return -ENOMEM; @@ -1187,7 +1187,7 @@ vxlan_mdb_entry_get(struct vxlan_dev *vxlan, if (mdb_entry) return mdb_entry; - mdb_entry = kzalloc(sizeof(*mdb_entry), GFP_KERNEL); + mdb_entry = kzalloc_obj(*mdb_entry, GFP_KERNEL); if (!mdb_entry) return ERR_PTR(-ENOMEM); diff --git a/drivers/net/vxlan/vxlan_vnifilter.c b/drivers/net/vxlan/vxlan_vnifilter.c index cde897d92f24..726a34d16fa2 100644 --- a/drivers/net/vxlan/vxlan_vnifilter.c +++ b/drivers/net/vxlan/vxlan_vnifilter.c @@ -697,7 +697,7 @@ static struct vxlan_vni_node *vxlan_vni_alloc(struct vxlan_dev *vxlan, { struct vxlan_vni_node *vninode; - vninode = kzalloc(sizeof(*vninode), GFP_KERNEL); + vninode = kzalloc_obj(*vninode, GFP_KERNEL); if (!vninode) return NULL; vninode->stats = netdev_alloc_pcpu_stats(struct vxlan_vni_stats_pcpu); @@ -925,7 +925,7 @@ int vxlan_vnigroup_init(struct vxlan_dev *vxlan) struct vxlan_vni_group *vg; int ret; - vg = kzalloc(sizeof(*vg), GFP_KERNEL); + vg = kzalloc_obj(*vg, GFP_KERNEL); if (!vg) return -ENOMEM; ret = rhashtable_init(&vg->vni_hash, &vxlan_vni_rht_params); |
