aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uio
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@citrix.com>2014-05-15 11:08:34 +0100
committerDavid S. Miller <davem@davemloft.net>2014-05-15 23:32:36 -0400
commit583757446ba6850eff96cef6565d729266da9c5b (patch)
treeae8bd3395f1e7b106b7a79a6bd468bc252193c9e /drivers/uio
parentipv6: update Destination Cache entries when gateway turn into host (diff)
downloadlinux-dev-583757446ba6850eff96cef6565d729266da9c5b.tar.xz
linux-dev-583757446ba6850eff96cef6565d729266da9c5b.zip
xen-netback: Fix grant ref resolution in RX path
The original series for reintroducing grant mapping for netback had a patch [1] to handle receiving of packets from an another VIF. Grant copy on the receiving side needs the grant ref of the page to set up the op. The original patch assumed (wrongly) that the frags array haven't changed. In the case reported by Sander, the sending guest sent a packet where the linear buffer and the first frag were under PKT_PROT_LEN (=128) bytes. xenvif_tx_submit() then pulled up the linear area to 128 bytes, and ditched the first frag. The receiving side had an off-by-one problem when gathered the grant refs. This patch fixes that by checking whether the actual frag's page pointer is the same as the page in the original frag list. It can handle any kind of changes on the original frags array, like: - removing granted frags from the array at any point - adding local pages to the frags list anywhere - reordering the frags It's optimized to the most common case, when there is 1:1 relation between the frags and the list, plus works optimal when frags are removed from the end or the beginning. [1]: 3e2234: xen-netback: Handle foreign mapped pages on the guest RX path Reported-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/uio')
0 files changed, 0 insertions, 0 deletions