diff options
| author | David S. Miller <davem@davemloft.net> | 2018-07-08 07:06:55 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-07-08 07:06:55 +0300 |
| commit | 7f93d1295131c9a8b6ff5eec13eef094f0d42921 (patch) | |
| tree | da6197820c36c00397f1043bceb3175e5476bfa4 /include/linux | |
| parent | f6f2a4a2eb92bc73671204198bb2f8ab53ff59fb (diff) | |
| parent | d8d7218ad842e18fc6976b87c08ed749e8d56313 (diff) | |
| download | linux-7f93d1295131c9a8b6ff5eec13eef094f0d42921.tar.xz | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says:
====================
pull-request: bpf 2018-07-07
The following pull-request contains BPF updates for your *net* tree.
Plenty of fixes for different components:
1) A set of critical fixes for sockmap and sockhash, from John Fastabend.
2) fixes for several race conditions in af_xdp, from Magnus Karlsson.
3) hash map refcnt fix, from Mauricio Vasquez.
4) samples/bpf fixes, from Taeung Song.
5) ifup+mtu check for xdp_redirect, from Toshiaki Makita.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 300baad62c88..c73dd7396886 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -765,8 +765,8 @@ static inline bool bpf_dump_raw_ok(void) struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, const struct bpf_insn *patch, u32 len); -static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, - struct net_device *fwd) +static inline int xdp_ok_fwd_dev(const struct net_device *fwd, + unsigned int pktlen) { unsigned int len; @@ -774,7 +774,7 @@ static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, return -ENETDOWN; len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; - if (skb->len > len) + if (pktlen > len) return -EMSGSIZE; return 0; |
