mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
BACKPORT: net: simplify cBPF setsockopt compat handling
Add a helper that copies either a native or compat bpf_fprog from userspace after verifying the length, and remove the compat setsockopt handlers that now aren't required. Change-Id: Ie62fb625ef94ad6d2148531c279e87e82524aae0 Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7425cadc33
commit
a13a4c9122
6 changed files with 40 additions and 96 deletions
|
|
@ -40,7 +40,6 @@ struct compat_cmsghdr {
|
|||
|
||||
int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *,
|
||||
struct sockaddr __user **, struct iovec **);
|
||||
struct sock_fprog __user *get_compat_bpf_fprog(char __user *optval);
|
||||
int put_cmsg_compat(struct msghdr*, int, int, int, void *);
|
||||
|
||||
int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *,
|
||||
|
|
|
|||
Loading…
Reference in a new issue