]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "xsk: simplify AF_XDP socket teardown"
authorBjörn Töpel <bjorn.topel@intel.com>
Thu, 21 Feb 2019 12:07:38 +0000 (13:07 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Feb 2019 15:32:25 +0000 (16:32 +0100)
commit5d6be359c67bf0f74a433e3ded09a18e7912225f
treebe203990ab00621f32769d7f43db841d2adc520e
parenta35d8218d61180e69ecbb5c8129aa87d79e60148
Revert "xsk: simplify AF_XDP socket teardown"

This reverts commit a6d166d5d6ad3ced1bc814be98b04a5ecda2d41d.

It turns out that the sock destructor xsk_destruct was needed after
all. The cleanup simplification broke the skb transmit cleanup path,
due to that the umem was prematurely destroyed.

The umem cannot be destroyed until all outstanding skbs are freed,
which means that we cannot remove the umem until the sk_destruct has
been called.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/xdp/xsk.c