]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: use correct accessors for scatterlists
authorIra W. Snyder <iws@ovro.caltech.edu>
Tue, 27 Jan 2009 05:00:33 +0000 (21:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jan 2009 05:00:33 +0000 (21:00 -0800)
commit89e817d640cede8792e75f90bada6b4a1dde1c82
treef5ec2235719ca1fe58431a35d3010f7cfa9ade5b
parentc880973b7a4c3135121ca41f9b82bd18717788e5
virtio_net: use correct accessors for scatterlists

Without this fix, virtio_net makes incorrect usage of scatterlists. It sets
the end of the scatterlist chain after the first element, despite the fact
that more entries come after it.

If you try to run dma_map_sg() on one of the scatterlists given to you by
add_buf(), you will get a null pointer oops.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c