From: David Ahern Date: Fri, 1 Sep 2017 15:18:07 +0000 (-0700) Subject: bpf: Collapse offset checks in sock_filter_is_valid_access X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9df59055ed8e2f817149e786b2a52bc17832d84e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bpf: Collapse offset checks in sock_filter_is_valid_access Make sock_filter_is_valid_access consistent with other is_valid_access helpers. Requested-by: Daniel Borkmann Signed-off-by: David Ahern Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller --- diff --git a/net/core/filter.c b/net/core/filter.c index 9dad3e7e2e10..f9add024d92f 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3468,9 +3468,7 @@ static bool sock_filter_is_valid_access(int off, int size, if (type == BPF_WRITE) { switch (off) { case offsetof(struct bpf_sock, bound_dev_if): - break; case offsetof(struct bpf_sock, mark): - break; case offsetof(struct bpf_sock, priority): break; default: