summary refs log tree commit diff stats
path: root/monitor/misc.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2022-09-26 05:32:01 -0400
committerKevin Wolf <kwolf@redhat.com>2022-10-07 12:11:41 +0200
commit962411244192a21717dcce216ec7bbc44272184c (patch)
tree714caf8f46a56202c29b391b15165da739253850 /monitor/misc.c
parentf41ab73fa283f4f4d79102d1c8e8bad456218751 (diff)
downloadfocaccia-qemu-962411244192a21717dcce216ec7bbc44272184c.tar.gz
focaccia-qemu-962411244192a21717dcce216ec7bbc44272184c.zip
jobs: add job lock in find_* functions
Both blockdev.c and job-qmp.c have TOC/TOU conditions, because
they first search for the job and then perform an action on it.
Therefore, we need to do the search + action under the same
job mutex critical section.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-9-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'monitor/misc.c')
0 files changed, 0 insertions, 0 deletions