diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-04-27 21:56:14 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2011-04-28 13:01:39 +0200 |
commit | b182801ab35f7a0afb3cdf8ba5df464d04206b46 (patch) | |
tree | dcdda5843c6453b60fe4adcf004283ac5f8e315b /include/linux/signal.h | |
parent | 943df1485a8ff0e600729e082e568ece04d4de9e (diff) | |
download | linux-b182801ab35f7a0afb3cdf8ba5df464d04206b46.tar.gz linux-b182801ab35f7a0afb3cdf8ba5df464d04206b46.tar.bz2 linux-b182801ab35f7a0afb3cdf8ba5df464d04206b46.zip |
signal: do_sigtimedwait() needs retarget_shared_pending()
do_sigtimedwait() changes current->blocked and thus it needs
set_current_blocked()->retarget_shared_pending().
We could use set_current_blocked() directly. It is fine to change
->real_blocked from all-zeroes to ->blocked and vice versa lockless,
but this is not immediately clear, looks racy, and needs a huge
comment to explain why this is correct.
To keep the things simple this patch adds the new static helper,
__set_task_blocked() which should be called with ->siglock held. This
way we can change both ->real_blocked and ->blocked atomically under
->siglock as the current code does. This is more understandable.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'include/linux/signal.h')
0 files changed, 0 insertions, 0 deletions