Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workqueue: Only unregister a registered lockdep key
The recent change to prevent use after free and a memory leak introduced an unconditional call to wq_unregister_lockdep() in the error handling path. If the lockdep key had not been registered yet, then the lockdep core emits a warning. Only call wq_unregister_lockdep() if wq_register_lockdep() has been called first. Fixes: 009bb42 ("workqueue, lockdep: Fix an alloc_workqueue() error path") Reported-by: [email protected] Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Qian Cai <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
- Loading branch information