Merge tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / net / ipv4 / ipmr.c
index f5c7a58..876fd6f 100644 (file)
@@ -636,7 +636,10 @@ static int call_ipmr_mfc_entry_notifiers(struct net *net,
 
 /**
  *     vif_delete - Delete a VIF entry
+ *     @mrt: Table to delete from
+ *     @vifi: VIF identifier to delete
  *     @notify: Set to 1, if the caller is a notifier_call
+ *     @head: if unregistering the VIF, place it on this queue
  */
 static int vif_delete(struct mr_table *mrt, int vifi, int notify,
                      struct list_head *head)
@@ -1338,7 +1341,7 @@ static void mrtsock_destruct(struct sock *sk)
  * MOSPF/PIM router set up we can clean this up.
  */
 
-int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
+int ip_mroute_setsockopt(struct sock *sk, int optname, sockptr_t optval,
                         unsigned int optlen)
 {
        struct net *net = sock_net(sk);
@@ -1410,7 +1413,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (copy_from_user(&vif, optval, sizeof(vif))) {
+               if (copy_from_sockptr(&vif, optval, sizeof(vif))) {
                        ret = -EFAULT;
                        break;
                }
@@ -1438,7 +1441,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (copy_from_user(&mfc, optval, sizeof(mfc))) {
+               if (copy_from_sockptr(&mfc, optval, sizeof(mfc))) {
                        ret = -EFAULT;
                        break;
                }
@@ -1456,7 +1459,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (get_user(val, (int __user *)optval)) {
+               if (copy_from_sockptr(&val, optval, sizeof(val))) {
                        ret = -EFAULT;
                        break;
                }
@@ -1468,7 +1471,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (get_user(val, (int __user *)optval)) {
+               if (copy_from_sockptr(&val, optval, sizeof(val))) {
                        ret = -EFAULT;
                        break;
                }
@@ -1483,7 +1486,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (get_user(val, (int __user *)optval)) {
+               if (copy_from_sockptr(&val, optval, sizeof(val))) {
                        ret = -EFAULT;
                        break;
                }
@@ -1505,7 +1508,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval,
                        ret = -EINVAL;
                        break;
                }
-               if (get_user(uval, (u32 __user *)optval)) {
+               if (copy_from_sockptr(&uval, optval, sizeof(uval))) {
                        ret = -EFAULT;
                        break;
                }