• Philippe Gerum's avatar
    drivers/ipc: bufp: fix read-write, write-write preemption cases · f50c998c
    Philippe Gerum authored
    The token-based approach for detecting preemption while data is being
    moved into or out of the ring only protects from read vs read races,
    not from races involving a write side. For instance, a reader might
    read dirty data being changed by a writer concurrently, or two writers
    might compete writing two distinct messages at the same place in the
    ring space.
    
    To address this issue, use a slot-based implementation which
    atomically reserves exclusive portions of the ring space readers and
    writers will be accessing locklessly. Those slots are guaranteed to
    never overlap among read and write requests, until the lockless
    operation finishes.
    Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
    f50c998c
Name
Last commit
Last update
config Loading commit data...
debian Loading commit data...
demo Loading commit data...
doc Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
scripts Loading commit data...
testsuite Loading commit data...
utils Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.md Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
configure.ac Loading commit data...