diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-01-26 01:36:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-29 12:02:53 -0500 |
commit | 406de7555424d93849166684d0bd172743d2a30c (patch) | |
tree | 8f440597d97aade025b56f2127d0a39bb60fd124 /lib | |
parent | ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only (diff) | |
download | linux-dev-406de7555424d93849166684d0bd172743d2a30c.tar.xz linux-dev-406de7555424d93849166684d0bd172743d2a30c.zip |
ptr_ring: keep consumer_head valid at all times
The comment near __ptr_ring_peek says:
* If ring is never resized, and if the pointer is merely
* tested, there's no need to take the lock - see e.g. __ptr_ring_empty.
but this was in fact never possible since consumer_head would sometimes
point outside the ring. Refactor the code so that it's always
pointing within a ring.
Fixes: c5ad119fb6c09 ("net: sched: pfifo_fast use skb_array")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions