Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / net / qrtr / qrtr.c
index 0c30908..b8508e3 100644 (file)
@@ -1157,14 +1157,14 @@ static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                rc = put_user(len, (int __user *)argp);
                break;
        case SIOCGIFADDR:
-               if (copy_from_user(&ifr, argp, sizeof(ifr))) {
+               if (get_user_ifreq(&ifr, NULL, argp)) {
                        rc = -EFAULT;
                        break;
                }
 
                sq = (struct sockaddr_qrtr *)&ifr.ifr_addr;
                *sq = ipc->us;
-               if (copy_to_user(argp, &ifr, sizeof(ifr))) {
+               if (put_user_ifreq(&ifr, argp)) {
                        rc = -EFAULT;
                        break;
                }