Re: [net-next PATCH] bpf: cpumap fix potential lost wake-up problem

2017-10-24 Thread David Miller
From: Jesper Dangaard Brouer Date: Mon, 23 Oct 2017 19:39:28 +0200 > As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff > to skb conversion and allocation") contains a classical example of the > potential lost wake-up problem. > > We need to recheck the

Re: [net-next PATCH] bpf: cpumap fix potential lost wake-up problem

2017-10-23 Thread Jesper Dangaard Brouer
On Mon, 23 Oct 2017 22:34:37 +0200 Daniel Borkmann wrote: > On 10/23/2017 07:39 PM, Jesper Dangaard Brouer wrote: > > As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff > > to skb conversion and allocation") contains a classical example of the > >

Re: [net-next PATCH] bpf: cpumap fix potential lost wake-up problem

2017-10-23 Thread Daniel Borkmann
On 10/23/2017 07:39 PM, Jesper Dangaard Brouer wrote: As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") contains a classical example of the potential lost wake-up problem. We need to recheck the condition __ptr_ring_empty() after changing

[net-next PATCH] bpf: cpumap fix potential lost wake-up problem

2017-10-23 Thread Jesper Dangaard Brouer
As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") contains a classical example of the potential lost wake-up problem. We need to recheck the condition __ptr_ring_empty() after changing current->state to TASK_INTERRUPTIBLE, this avoids a race