diff options
author | jhb <jhb@FreeBSD.org> | 2007-08-31 19:01:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-08-31 19:01:30 +0000 |
commit | c54b68ab60eecb5c06e27dc1c38bd56f61b5a8fc (patch) | |
tree | b8d8e434794ffd20b69e404fb79c0f23f5d23953 /usr.bin/opiepasswd | |
parent | 01348838463a02c468390e817a9507e889103c83 (diff) | |
download | FreeBSD-src-c54b68ab60eecb5c06e27dc1c38bd56f61b5a8fc.zip FreeBSD-src-c54b68ab60eecb5c06e27dc1c38bd56f61b5a8fc.tar.gz |
Close a race that snuck in with the recent changes to fix a LOR between
the callout_lock spin lock and the sleepqueue spin locks. In the fix,
callout_drain() has to drop the callout_lock so it can acquire the
sleepqueue lock. The state of the callout can change while the
callout_lock is held however (for example, it can be rescheduled via
callout_reset()). The previous code assumed that the only state change
that could happen is that the callout could finish executing. This change
alters callout_drain() to effectively restart and recheck everything
after it acquires the sleepqueue lock thus handling all the possible
states that the callout could be in after any changes while callout_lock
was dropped.
Approved by: re (kensmith)
Tested by: kris
Diffstat (limited to 'usr.bin/opiepasswd')
0 files changed, 0 insertions, 0 deletions