]> git.baikalelectronics.ru Git - kernel.git/commit
tun: fix tun_chr_aio_read so that aio works
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 20 Apr 2009 01:25:59 +0000 (01:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2009 12:42:45 +0000 (05:42 -0700)
commitaf63b0dd50c9d0b2dff8fefcd53c909ca4bf99f0
tree117c9b756380b59c8c29955f02c4d9ff504b047a
parenta2e4f8f949cee7cc1b54a7ebc6d33625cc13acf0
tun: fix tun_chr_aio_read so that aio works

aio_read gets const struct iovec * but tun_chr_aio_read casts this to struct
iovec * and modifies the iovec. As a result, attempts to use io_submit
to get packets from a tun device fail with weird errors such as EINVAL.

Fix by using the new skb_copy_datagram_const_iovec.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c