diff options
author | David S. Miller <davem@davemloft.net> | 2018-02-04 16:46:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-04 16:46:58 -0500 |
commit | a6b88814ab541d386d793f6df260a3e4d5cccb11 (patch) | |
tree | a7c633be819bb450edab3beebd1a9a0cfba8bb72 /drivers/net | |
parent | 35277995e17919ab838beae765f440674e8576eb (diff) | |
parent | 09c0656dfabd0b15e410eca67dc45cb14ec9c13a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says:
====================
pull-request: bpf 2018-02-02
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) support XDP attach in libbpf, from Eric.
2) minor fixes, from Daniel, Jakub, Yonghong, Alexei.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/netdevsim/bpf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c index de73c1ff0939..75c25306d234 100644 --- a/drivers/net/netdevsim/bpf.c +++ b/drivers/net/netdevsim/bpf.c @@ -480,8 +480,7 @@ static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { struct nsim_bpf_bound_map *nmap; - unsigned int i; - int err; + int i, err; if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && offmap->map.map_type != BPF_MAP_TYPE_HASH)) @@ -518,7 +517,7 @@ nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) return 0; err_free: - while (--i) { + while (--i >= 0) { kfree(nmap->entry[i].key); kfree(nmap->entry[i].value); } |