In order for load/store tearing prevention to work, _all_ accesses to the variable in question need to be done around READ and WRITE_ONCE() macros. Ensure everyone does so for q->status variable for semtimedop().
Unified · Split
| @@ -2118,7 +2118,7 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops, · 2117 unmodified lines | ||
| 2118 | 2118 | } |
| 2119 | 2119 | |
| 2120 | 2120 | do { |
| 2121 | − queue.status = -EINTR; | |
| 2121 | + WRITE_ONCE(queue.status, -EINTR); | |
| 2122 | 2122 | queue.sleeper = current; |
| 2123 | 2123 | |
| 2124 | 2124 | __set_current_state(TASK_INTERRUPTIBLE); |