Messages in this thread | | | Date | Mon, 27 Feb 2023 16:43:59 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH] cocci: cpi: add complete api check script |
| |
On Mon, Feb 27, 2023 at 10:28:08AM -0500, Steven Rostedt wrote:
> So what exact race are you trying to catch here?
on-stack copmletion with a wait_for_completion that can return early (eg. killable, interruptible, or timeout) can go out of scope (eg, free the completion) with the other side calling complete() on some possibly re-used piece of stack.
IOW, Use-after-Free.
Care must be taken to ensure the other side (whatever does complete()) is either terminated or otherwise stopped from calling complete() on an out-of-scope variable.
| |