HomeFreeBSD

Fix a race in tty_signal_sessleader() with unlocked read of s_leader.

Description

Fix a race in tty_signal_sessleader() with unlocked read of s_leader.

Since we do not own the session lock, a parallel killjobc() might
reset s_leader to NULL after we checked it. Read s_leader only once
and ensure that compiler is not allowed to reload.

While there, make access to t_session somewhat more pretty by using
local variable.

PR: 251915
Submitted by: Jakub Piecuch <j.piecuch96@gmail.com>
MFC after: 1 week

Details

Provenance
kibAuthored on Dec 17 2020, 7:51 PM
Parents
rG0ebcbcc0efdd: Update the unbound version number from r368478.
Branches
Unknown
Tags
Unknown

Event Timeline