Message ID | 1505940337-79069-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 aa4f86d64545..e070c0934638 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4893,7 +4893,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; }