diff options
author | Yi Yang <yangyi01@inspur.com> | 2020-10-14 15:22:48 +0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-02-01 19:53:03 +0100 |
commit | c17f32a11c94daafe48a608e66db44df24c43779 (patch) | |
tree | ef7b42669c1d055d66feab8af6599dd968a8d244 /Documentation | |
parent | 75e1e6fd2d6beee90e7eff5ce8059c44aa67c0ec (diff) | |
download | openvswitch-c17f32a11c94daafe48a608e66db44df24c43779.tar.gz |
netdev-dpdk: Fix incorrect shinfo initialization.
shinfo is used to store reference counter and free callback
of an external buffer, but it is stored in mbuf if the mbuf
has tailroom for it.
This is wrong because the mbuf (and its data) can be freed
before the external buffer, for example:
pkt2 = rte_pktmbuf_alloc(mp);
rte_pktmbuf_attach(pkt2, pkt);
rte_pktmbuf_free(pkt);
After this, pkt is freed, but it still contains shinfo, which
is referenced by pkt2.
This sequence of operations is possible inside DPDK e.g., while
performing TSO operations for 'net_tap' PMD.
Fix this by always storing shinfo at the tail of external buffer.
Fixes: 29cf9c1b3b9c ("userspace: Add TCP Segmentation Offload support")
Co-authored-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions