diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-22 08:56:55 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-22 08:56:55 +0200 |
| commit | b4a338d2b3cafa1be68d4e1903203c7e08a38ee5 (patch) | |
| tree | 069f3753af1cda34c36a7627000ab46ef5c51c83 /kernel/bpf/syscall.c | |
| parent | 34cfb106d1f8a746fcccbe61c852f705dcdceaa2 (diff) | |
| parent | 08332893e37af6ae779367e78e444f8f9571511d (diff) | |
| download | lwn-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.tar.gz lwn-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.zip | |
Merge 4.12-rc2 into char-misc-next
We want the fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf/syscall.c')
| -rw-r--r-- | kernel/bpf/syscall.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index fd2411fd6914..265a0d854e33 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -783,7 +783,7 @@ struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type) EXPORT_SYMBOL_GPL(bpf_prog_get_type); /* last field in 'union bpf_attr' used by this command */ -#define BPF_PROG_LOAD_LAST_FIELD kern_version +#define BPF_PROG_LOAD_LAST_FIELD prog_flags static int bpf_prog_load(union bpf_attr *attr) { @@ -796,6 +796,9 @@ static int bpf_prog_load(union bpf_attr *attr) if (CHECK_ATTR(BPF_PROG_LOAD)) return -EINVAL; + if (attr->prog_flags & ~BPF_F_STRICT_ALIGNMENT) + return -EINVAL; + /* copy eBPF program license from user space */ if (strncpy_from_user(license, u64_to_user_ptr(attr->license), sizeof(license) - 1) < 0) |
