Merge tag 'v6.5-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-microblaze.git] / net / sctp / socket.c
index a68e1d5..6554a35 100644 (file)
@@ -4895,7 +4895,7 @@ out:
 }
 
 /* The SCTP ioctl handler. */
-static int sctp_ioctl(struct sock *sk, int cmd, unsigned long arg)
+static int sctp_ioctl(struct sock *sk, int cmd, int *karg)
 {
        int rc = -ENOTCONN;
 
@@ -4911,7 +4911,7 @@ static int sctp_ioctl(struct sock *sk, int cmd, unsigned long arg)
        switch (cmd) {
        case SIOCINQ: {
                struct sk_buff *skb;
-               unsigned int amount = 0;
+               *karg = 0;
 
                skb = skb_peek(&sk->sk_receive_queue);
                if (skb != NULL) {
@@ -4919,9 +4919,9 @@ static int sctp_ioctl(struct sock *sk, int cmd, unsigned long arg)
                         * We will only return the amount of this packet since
                         * that is all that will be read.
                         */
-                       amount = skb->len;
+                       *karg = skb->len;
                }
-               rc = put_user(amount, (int __user *)arg);
+               rc = 0;
                break;
        }
        default: