zephyr/include
Daniel Glöckner 5ef825fdf6 net: pkt: fix race condition in packet reference counting
It has been observed that some network drivers, f.ex. the SAM E70 GMAC,
call net_pkt_unref from inside the interrupt that signals the successful
transmission of a packet. This conflicts with the net_pkt_unref call
made by ethernet_send after the packet has been given to the driver.

We fix this by using an atomic_t to hold the reference count as there
might be other, difficult to find cases of net_pkt_(un)ref being used
across threads and interrupts.

The name of the element has been changed from "ref" to "atomic_ref" to
cause a compile error when code still has not been converted to use the
atomic_* functions.

Fixes #12708

Signed-off-by: Daniel Glöckner <dg@emlix.com>
2019-01-29 09:22:14 +02:00
..
app_memory
arch
audio
bluetooth
cmsis_rtos_v1
cmsis_rtos_v2
crypto
debug
dfu
display
drivers
dt-bindings
fs
linker
logging
mgmt
misc
net
nvs
posix
random
settings
shell
toolchain
usb
zephyr
adc.h
aio_comparator.h
atomic.h
base64.h
cache.h
can.h
clock_control.h
console.h
counter.h
crc.h
crc8.h
crc16.h
crc32.h
device.h
disk_access.h
display.h
dma.h
entropy.h
exc_handle.h
fcb.h
flash_map.h
flash.h
fs.h
generated_dts_board.h
gna.h
gpio.h
i2c.h
i2s.h
init.h
ipm.h
irq_nextlevel.h
irq_offload.h
irq.h
json.h
kernel_includes.h
kernel_version.h
kernel.h
led_strip.h
led.h
pinmux.h
power.h
ptp_clock.h
pwm.h
ring_buffer.h
rtc.h
sched_priq.h
sensor.h
shared_irq.h
spi.h
spinlock.h
stats.h
sw_isr_table.h
sys_clock.h
sys_io.h
syscall.h
toolchain.h
tracing.h
tty.h
uart.h
watchdog.h
zephyr.h