summaryrefslogtreecommitdiffstats
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-04-20 01:26:11 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-21 05:42:46 -0700
commit6f26c9a7555e5bcca3560919db9b852015077dae (patch)
tree9ca7509cd0cbbdae158b752c234cb23add8370f0 /include/linux/socket.h
parent43b39dcdbdf823a1c0ac1f2aa2d76bd2f210adc8 (diff)
tun: fix tun_chr_aio_write so that aio works
aio_write gets const struct iovec * but tun_chr_aio_write casts this to struct iovec * and modifies the iovec. As a result, attempts to use io_submit to send packets to a tun device fail with weird errors such as EINVAL. Since tun is the only user of skb_copy_datagram_from_iovec, we can fix this simply by changing the later so that it does not touch the iovec passed to it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 171b08db9c4..42a0396f2c5 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -309,8 +309,8 @@ struct ucred {
#ifdef __KERNEL__
extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
-extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov,
- int offset, 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,
struct iovec *iov,
int offset,