aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d994d822900d..998e63a31311 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5868,11 +5868,12 @@ SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *msg,
5868 sctp_cmsgs_t *cmsgs) 5868 sctp_cmsgs_t *cmsgs)
5869{ 5869{
5870 struct cmsghdr *cmsg; 5870 struct cmsghdr *cmsg;
5871 struct msghdr *my_msg = (struct msghdr *)msg;
5871 5872
5872 for (cmsg = CMSG_FIRSTHDR(msg); 5873 for (cmsg = CMSG_FIRSTHDR(msg);
5873 cmsg != NULL; 5874 cmsg != NULL;
5874 cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) { 5875 cmsg = CMSG_NXTHDR(my_msg, cmsg)) {
5875 if (!CMSG_OK(msg, cmsg)) 5876 if (!CMSG_OK(my_msg, cmsg))
5876 return -EINVAL; 5877 return -EINVAL;
5877 5878
5878 /* Should we parse this header or ignore? */ 5879 /* Should we parse this header or ignore? */