Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Fix this by always storing shinfo at the tail of external buffer. Fixes: 29cf9c1 ("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> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information