mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
posix-timers: Set k_itimer:: It_signal to NULL on exit()
Technically it's not required to set k_itimer::it_signal to NULL on exit() because there is no other thread anymore which could lookup the timer concurrently. Set it to NULL for consistency sake and add a comment to that effect. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20230425183313.196462644@linutronix.de
This commit is contained in:
parent
028cf5eaa1
commit
72786ff23d
@ -1101,6 +1101,14 @@ retry_delete:
|
||||
}
|
||||
list_del(&timer->list);
|
||||
|
||||
/*
|
||||
* Setting timer::it_signal to NULL is technically not required
|
||||
* here as nothing can access the timer anymore legitimately via
|
||||
* the hash table. Set it to NULL nevertheless so that all deletion
|
||||
* paths are consistent.
|
||||
*/
|
||||
WRITE_ONCE(timer->it_signal, NULL);
|
||||
|
||||
spin_unlock_irqrestore(&timer->it_lock, flags);
|
||||
release_posix_timer(timer, IT_ID_SET);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user