OSDN Git Service

virtio_net: fix PAGE_SIZE > 64k
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 23 Jan 2017 19:37:52 +0000 (21:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:37:19 +0000 (14:37 +0200)
commit00e83abf8e62fa94bea16656f095503b028b07f8
tree44cce9e2e3a7755961195069ed0435815ef78c50
parentc64f4194a65b0d76a3f8dc0b275b290704b6195a
virtio_net: fix PAGE_SIZE > 64k

[ Upstream commit d0fa28f00052391b5df328f502fbbdd4444938b7 ]

I don't have any guests with PAGE_SIZE > 64k but the
code seems to be clearly broken in that case
as PAGE_SIZE / MERGEABLE_BUFFER_ALIGN will need
more than 8 bit and so the code in mergeable_ctx_to_buf_address
does not give us the actual true size.

Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/virtio_net.c