On Tue, May 18, 2021 at 01:27:39PM +0200, Magnus Karlsson wrote:
From: Magnus Karlsson magnus.karlsson@intel.com
Hi Greg and Sasha,
Please find attached backports of commit 11cc2d21499c ("xsk: Simplify detection of empty and full rings") for the 5.4.y and 4.19.y stable series. It solves a reproducible race between poll() and sendmsg() when used concurrently by two different processes using the same AF_XDP socket. Note that the commit above unknowingly (read: by sheer luck) fixed the bug as it was about simplification and performance improvement only. I have included two backports that are code wise equivallent to the commit above, however, they contain a commit message that describes the race in question and how it is fixed by the patch. Sorry, but I do not know the correct procedure in these kind of situations, but if you prefer to pick the original commit, please ignore the "backports" below.
In general, if it applies/builds/works cleanly, just telling us the commit id would be enough. I've queued this one for 5.4 and 4.19, thanks!