diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-09 03:02:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-09 03:02:35 -0400 |
commit | 1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch) | |
tree | 47da3feee8e263e8c9352c85cf518e624be3c211 /net/compat.c | |
parent | 750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff) | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) |
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/compat.c')
-rw-r--r-- | net/compat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/compat.c b/net/compat.c index 6ded6c821d7a..22381719718c 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -185,6 +185,13 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk, | |||
185 | ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen); | 185 | ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen); |
186 | } | 186 | } |
187 | 187 | ||
188 | /* | ||
189 | * check the length of messages copied in is the same as the | ||
190 | * what we get from the first loop | ||
191 | */ | ||
192 | if ((char *)kcmsg - (char *)kcmsg_base != kcmlen) | ||
193 | goto Einval; | ||
194 | |||
188 | /* Ok, looks like we made it. Hook it up and return success. */ | 195 | /* Ok, looks like we made it. Hook it up and return success. */ |
189 | kmsg->msg_control = kcmsg_base; | 196 | kmsg->msg_control = kcmsg_base; |
190 | kmsg->msg_controllen = kcmlen; | 197 | kmsg->msg_controllen = kcmlen; |