diff options
author | Simon Rettberg | 2020-11-20 14:19:21 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-11-20 14:19:21 +0100 |
commit | b4d8353913a2f54a9bce314e84415e868dc096cb (patch) | |
tree | 8712205f0b6b9970b1c197e8b9b4f86c52884798 /src/server/globals.c | |
parent | [KERNEL] Cleanup thread cleanup, fix closing of device when busy (diff) | |
download | dnbd3-b4d8353913a2f54a9bce314e84415e868dc096cb.tar.gz dnbd3-b4d8353913a2f54a9bce314e84415e868dc096cb.tar.xz dnbd3-b4d8353913a2f54a9bce314e84415e868dc096cb.zip |
[KERNEL] Fix race condition for request_queuereceive in receive thread
Formerly, the request that was about to be received was looked up in
the receive queue without removing it, then the request payload was
received from the socket while the lock was not being held, and finally,
the lock was required again and the request removed from the queue.
This is dangrous as another thread can concurrently take the request
from the queue while the receive thread reads the payload from the
socket, leading to a double-free by calling blk_mq_end_request twice.
Diffstat (limited to 'src/server/globals.c')
0 files changed, 0 insertions, 0 deletions