]> git.baikalelectronics.ru Git - kernel.git/commit
tun: fix tun_chr_aio_write so that aio works
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 20 Apr 2009 01:26:11 +0000 (01:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2009 12:42:46 +0000 (05:42 -0700)
commitf2ed83108ceaa15aa60ce0801ce915ecd1234980
tree9ca7509cd0cbbdae158b752c234cb23add8370f0
parentaf63b0dd50c9d0b2dff8fefcd53c909ca4bf99f0
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>
drivers/net/tun.c
include/linux/skbuff.h
include/linux/socket.h
net/core/datagram.c
net/core/iovec.c