net: pass kern to net_proto_family create function
[firefly-linux-kernel-4.4.55.git] / net / econet / af_econet.c
index 6529be3a18b7968e83652dcab05ac9edaacd1d3e..596679803de57626b1c4220389fb3ec1da46317a 100644 (file)
@@ -457,15 +457,15 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
        iov[0].iov_len = size;
        for (i = 0; i < msg->msg_iovlen; i++) {
                void __user *base = msg->msg_iov[i].iov_base;
-               size_t len = msg->msg_iov[i].iov_len;
+               size_t iov_len = msg->msg_iov[i].iov_len;
                /* Check it now since we switch to KERNEL_DS later. */
-               if (!access_ok(VERIFY_READ, base, len)) {
+               if (!access_ok(VERIFY_READ, base, iov_len)) {
                        mutex_unlock(&econet_mutex);
                        return -EFAULT;
                }
                iov[i+1].iov_base = base;
-               iov[i+1].iov_len = len;
-               size += len;
+               iov[i+1].iov_len = iov_len;
+               size += iov_len;
        }
 
        /* Get a skbuff (no data, just holds our cb information) */
@@ -605,7 +605,8 @@ static struct proto econet_proto = {
  *     Create an Econet socket
  */
 
-static int econet_create(struct net *net, struct socket *sock, int protocol)
+static int econet_create(struct net *net, struct socket *sock, int protocol,
+                        int kern)
 {
        struct sock *sk;
        struct econet_sock *eo;