diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2014-07-05 15:14:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 15:30:10 -0700 |
commit | d68ab591f874cf752101ac77b08c01123b6f3a2e (patch) | |
tree | 65d6ad13d4d7a4b2de150eb84280a2e6ba674563 /virt/kvm/coalesced_mmio.c | |
parent | 90fb5679e568b11b89e02b87f7f4fe00c7589ce0 (diff) | |
download | blackbird-obmc-linux-d68ab591f874cf752101ac77b08c01123b6f3a2e.tar.gz blackbird-obmc-linux-d68ab591f874cf752101ac77b08c01123b6f3a2e.zip |
defxx: Correct the receive DMA map size
Receive DMA maps are oversized, they include EISA legacy 128-byte
alignment padding in size calculation whereas this padding is never used
for data. Worse yet, if the skb's data area has been realigned indeed,
then data beyond the end of the buffer will be synchronised from the
receive DMA bounce buffer, possibly corrupting data structures residing
in memory beyond the actual end of this data buffer.
Therefore switch to using PI_RCV_DATA_K_SIZE_MAX rather than NEW_SKB_SIZE
in DMA mapping, the value the former macro expands to is written to the
receive ring DMA descriptor of the PDQ DMA chip and determines the
maximum amount of data PDQ will ever transfer to the corresponding data
buffer, including all headers and padding.
Reported-by: Robert Coerver <Robert.Coerver@ll.mit.edu>
Tested-by: Robert Coerver <Robert.Coerver@ll.mit.edu>
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt/kvm/coalesced_mmio.c')
0 files changed, 0 insertions, 0 deletions