aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/net/bpf_jit_comp.c
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
committerGary S. Robertson <gary.robertson@linaro.org>2014-07-16 17:57:27 -0500
commit5d8c39dfa92c11553a1091717407aeaddc3de603 (patch)
tree0df1e82ebdde6b9e3722fd16f9195be36a73c144 /arch/s390/net/bpf_jit_comp.c
parent0993b170ac452761d5b49bca4f7022f2f14c50bc (diff)
parentc0cbbdebe91a944d653ca75670b77bbf57498150 (diff)
Merge tag 'v3.14.12' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-lng-v3.14.xlinux-lng-3.14.12-2014.07
This is the 3.14.12 stable release Conflicts: arch/arm/mm/proc-v7-3level.S kernel/hrtimer.c mm/hugetlb.c
Diffstat (limited to 'arch/s390/net/bpf_jit_comp.c')
-rw-r--r--arch/s390/net/bpf_jit_comp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 708d60e40066..8e08c6712eb8 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -276,7 +276,6 @@ static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter)
case BPF_S_LD_W_IND:
case BPF_S_LD_H_IND:
case BPF_S_LD_B_IND:
- case BPF_S_LDX_B_MSH:
case BPF_S_LD_IMM:
case BPF_S_LD_MEM:
case BPF_S_MISC_TXA:
@@ -812,7 +811,7 @@ static struct bpf_binary_header *bpf_alloc_binary(unsigned int bpfsize,
return NULL;
memset(header, 0, sz);
header->pages = sz / PAGE_SIZE;
- hole = sz - (bpfsize + sizeof(*header));
+ hole = min(sz - (bpfsize + sizeof(*header)), PAGE_SIZE - sizeof(*header));
/* Insert random number of illegal instructions before BPF code
* and make sure the first instruction starts at an even address.
*/