Thread (11 messages) 11 messages, 5 authors, 2019-09-03

Re: [PATCH bpf-next v2 2/4] xsk: add proper barriers and {READ, WRITE}_ONCE-correctness for state

From: Jonathan Lemon <hidden>
Date: 2019-08-26 17:54:37
Also in: bpf


On 25 Aug 2019, at 23:10, Björn Töpel wrote:
From: Björn Töpel <redacted>

The state variable was read, and written outside the control mutex
(struct xdp_sock, mutex), without proper barriers and {READ,
WRITE}_ONCE correctness.

In this commit this issue is addressed, and the state member is now
used a point of synchronization whether the socket is setup correctly
or not.

This also fixes a race, found by syzcaller, in xsk_poll() where umem
could be accessed when stale.

Suggested-by: Hillf Danton <redacted>
Reported-by: syzbot+c82697e3043781e08802@syzkaller.appspotmail.com
Fixes: 77cd0d7b3f25 ("xsk: add support for need_wakeup flag in AF_XDP 
rings")
Signed-off-by: Björn Töpel <redacted>
Acked-by: Jonathan Lemon <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help