linux_dsm_epyc7002/include
Michael S. Tsirkin 406de75554 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: c5ad119fb6 ("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>
2018-01-29 12:02:53 -05:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kvm
linux ptr_ring: keep consumer_head valid at all times 2018-01-29 12:02:53 -05:00
math-emu
media
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-29 10:15:51 -05:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-01-28 21:22:46 -05:00
video
xen