Message ID | 1503956111-36652-23-git-send-email-keescook@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index c8784cb216e4..a29e41e19d64 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4882,7 +4882,7 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv len = sizeof(int); if (put_user(len, optlen)) return -EFAULT; - if (copy_to_user(optval, &sctp_sk(sk)->autoclose, sizeof(int))) + if (put_user(sctp_sk(sk)->autoclose, (int __user *)optval)) return -EFAULT; return 0; }