diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2017-10-23 19:39:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-24 18:40:22 +0900 |
commit | 31749468c3f9d77927ed3144259dc208e6625ede (patch) | |
tree | 33d083824b454cd344121d6ef8ed2ac1d37afeb4 /MAINTAINERS | |
parent | 7f6b437e9b82a6d702a7f8f75c83ffdec6e03c54 (diff) | |
download | linux-31749468c3f9d77927ed3144259dc208e6625ede.tar.bz2 |
bpf: cpumap fix potential lost wake-up problem
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 between
wake_up_process() and schedule(). After this, a race with
wake_up_process() will simply change the state to TASK_RUNNING, and
the schedule() call not really put us to sleep.
Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation")
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions