[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 10/20] jobs: add job lock in find_* functions
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v8 10/20] jobs: add job lock in find_* functions |
Date: |
Tue, 5 Jul 2022 09:03:48 +0100 |
On Wed, Jun 29, 2022 at 10:15:28AM -0400, Emanuele Giuseppe Esposito wrote:
> 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>
> ---
> blockdev.c | 67 +++++++++++++++++++++++++++++++++++++-----------------
> job-qmp.c | 55 ++++++++++++++++++++++++++++++--------------
> 2 files changed, 84 insertions(+), 38 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v8 10/20] jobs: add job lock in find_* functions,
Stefan Hajnoczi <=