summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:39 +0000
commit27a2c36c9538c7e5536a1b20fd74f0fc911d7950 (patch)
tree3101221cb1458bce62f7ae76638517d93f8b64a8 /ipc/sem.c
parentReleasing progress-linux version 4.19.260-1progress5u1. (diff)
downloadlinux-27a2c36c9538c7e5536a1b20fd74f0fc911d7950.tar.xz
linux-27a2c36c9538c7e5536a1b20fd74f0fc911d7950.zip
Merging upstream version 4.19.269.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 2bf535dd0..cc6af85d1 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -2148,6 +2148,7 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops,
* scenarios where we were awakened externally, during the
* window between wake_q_add() and wake_up_q().
*/
+ rcu_read_lock();
error = READ_ONCE(queue.status);
if (error != -EINTR) {
/*
@@ -2157,10 +2158,10 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops,
* overwritten by the previous owner of the semaphore.
*/
smp_mb();
+ rcu_read_unlock();
goto out_free;
}
- rcu_read_lock();
locknum = sem_lock(sma, sops, nsops);
if (!ipc_valid_object(&sma->sem_perm))