Skip to contentSkip to conversation

bpf: Collapse offset checks in sock_filter_is_valid_access

PATCH Applied David Ahern 4 participants 4 messages Sep 1, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: Collapse offset checks in sock_filter_is_valid_access

Make sock_filter_is_valid_access consistent with other is_valid_access helpers.

---
 net/core/filter.c | 2 --
 1 file changed, 2 deletions(-)
net/core/filter.c +0 -2
index 9dad3e7e2e10..f9add024d92f 100644
@@ -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:
Signature · 1 line
2.1.4