Commit cd9ff91b authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Tim Wickberg
Browse files

Prevent a race between completing jobs on a user-exclusive node from leaving the node owned.

Two jobs completing simultaneously leads to make_node_idle()
returning before it has a chance to decrement node_ptr->owner_job_cnt,
which can result in the node being "owned" by that user even
through no jobs are running on it.

Move the decrement block to the end at a fini label, and make sure
all return paths pass through it. While moving that add a guard
against node_ptr->owner_job_cnt underflowing.

Bug 3771.
parent 162f6a05
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment