aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-10-27 23:03:52 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-10-27 23:03:52 -0400
commit7c8d004d6dd8917c1f1836c7bb84e2291aa427c9 (patch)
tree4c6684cdc0e94be397d330e03d7c02cfdcf2fd31
parent7b8aa0b5c9af22b0ec6ab5f5a08d154ade28d0f2 (diff)
parentfdd4ec3d0e21b43169dfafb77d0a8116d77a2f52 (diff)
downloadlinux-yocto-7c8d004d6dd8917c1f1836c7bb84e2291aa427c9.tar.gz
linux-yocto-7c8d004d6dd8917c1f1836c7bb84e2291aa427c9.tar.bz2
linux-yocto-7c8d004d6dd8917c1f1836c7bb84e2291aa427c9.zip
Merge branch 'v4.19/standard/preempt-rt/base' into v4.19/standard/preempt-rt/intel-x86
-rw-r--r--kernel/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index afb7fd849ffb..e5b38411bf8f 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -490,8 +490,8 @@ static void sigqueue_free_current(struct sigqueue *q)
up = q->user;
if (rt_prio(current->normal_prio) && !put_task_cache(current, q)) {
- atomic_dec(&up->sigpending);
- free_uid(up);
+ if (atomic_dec_and_test(&up->sigpending))
+ free_uid(up);
} else
__sigqueue_free(q);
}