mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
43b39dcdbd
commit
6f26c9a755
5 changed files with 30 additions and 17 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue