[RFC PATCH v2 13/14] jobs: add job lock in find_* functions

2021-11-04 Thread Emanuele Giuseppe Esposito
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

Re: [RFC PATCH v2 13/14] jobs: add job lock in find_* functions

2021-12-18 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 17:53, 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_{loc

Re: [RFC PATCH v2 13/14] jobs: add job lock in find_* functions

2021-12-18 Thread Vladimir Sementsov-Ogievskiy
18.12.2021 15:11, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 17:53, 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