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 8c90289ba400..e7e3baf7009e 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5848,11 +5848,12 @@ SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *msg,
5848 sctp_cmsgs_t *cmsgs) 5848 sctp_cmsgs_t *cmsgs)
5849{ 5849{
5850 struct cmsghdr *cmsg; 5850 struct cmsghdr *cmsg;
5851 struct msghdr *my_msg = (struct msghdr *)msg;
5851 5852
5852 for (cmsg = CMSG_FIRSTHDR(msg); 5853 for (cmsg = CMSG_FIRSTHDR(msg);
5853 cmsg != NULL; 5854 cmsg != NULL;
5854 cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) { 5855 cmsg = CMSG_NXTHDR(my_msg, cmsg)) {
5855 if (!CMSG_OK(msg, cmsg)) 5856 if (!CMSG_OK(my_msg, cmsg))
5856 return -EINVAL; 5857 return -EINVAL;
5857 5858
5858 /* Should we parse this header or ignore? */ 5859 /* Should we parse this header or ignore? */