Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2f83e90 authored by Rusty Russell's avatar Rusty Russell
Browse files

Hoist memcpy_fromiovec/memcpy_toiovec into lib/



ERROR: "memcpy_fromiovec" [drivers/vhost/vhost_scsi.ko] undefined!

That function is only present with CONFIG_NET.  Turns out that
crypto/algif_skcipher.c also uses that outside net, but it actually
needs sockets anyway.

In addition, commit 6d4f0139 added
CONFIG_NET dependency to CONFIG_VMCI for memcpy_toiovec, so hoist
that function and revert that commit too.

socket.h already includes uio.h, so no callers need updating; trying
only broke things fo x86_64 randconfig (thanks Fengguang!).

Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent d5fe85af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

config VMWARE_VMCI
	tristate "VMware VMCI Driver"
	depends on X86 && PCI && NET
	depends on X86 && PCI
	help
	  This is VMware's Virtual Machine Communication Interface.  It enables
	  high-speed communication between host and guest in a virtual
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include <linux/pagemap.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/uio.h>
#include <linux/wait.h>
#include <linux/vmalloc.h>

+0 −2
Original line number Diff line number Diff line
@@ -305,7 +305,6 @@ struct ucred {

extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred);

extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
			       int offset, int len);
extern int csum_partial_copy_fromiovecend(unsigned char *kdata, 
@@ -314,7 +313,6 @@ extern int csum_partial_copy_fromiovecend(unsigned char *kdata,
					  unsigned int len, __wsum *csump);

extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *address, int mode);
extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata,
			     int offset, int len);
extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr);
+3 −0
Original line number Diff line number Diff line
@@ -35,4 +35,7 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
}

unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);

int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ endif

lib-y := ctype.o string.o vsprintf.o cmdline.o \
	 rbtree.o radix-tree.o dump_stack.o timerqueue.o\
	 idr.o int_sqrt.o extable.o \
	 idr.o int_sqrt.o extable.o iovec.o \
	 sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \
	 proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \
	 is_single_threaded.o plist.o decompress.o kobject_uevent.o \
Loading