Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/dev/pci
Module Name: src
Committed By: yamaguchi
Date: Fri Apr 21 02:17:32 UTC 2023
Modified Files:
src/sys/dev/pci: virtio.c
Log Message:
virtio(4): change members of struct vring_desc_extra before free a slot
This prevents the following race condition.
1. Thread-A: calls virtio_dequeue_commit() and
puts a slot into free descriptor chain in vq_free_slot()
2. Thread-B: calls virtio_enqueue_prep() and get the slot stored by Thread-A
3. Thread-B: calls virtio_enqueue_reserve() and
changes desc_base and desc_free_idx for the slot
4. Thread-A: changes the same members updated by Thread-B
reported by hannken, thanks.
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/virtio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index