Bug 62071 - ipc/sem.c: sem_otime not updated after wait-for-zero semops that do not wait
Summary: ipc/sem.c: sem_otime not updated after wait-for-zero semops that do not wait
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL: http://marc.info/?l=linux-kernel&m=13...
Keywords:
Depends on:
Blocks: 62061
  Show dependency tree
 
Reported: 2013-09-25 07:56 UTC by Manfred Spraul
Modified: 2013-10-02 07:18 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Manfred Spraul 2013-09-25 07:56:47 UTC
All successful semop calls must update sem_otime.

Jia noticed that wait-for-zero semops do not update sem_otime if they do not sleep.

Affected:
The bug is present in 3.2.51 - probably all kernels after the introduction of do_smart_update().

Two approaches for fixing:
- Move sem_otime = get_seconds() into perform_atomic_semop and then remove the whole "semop_completed" logic.

OR

- add "if (!alter) sem_otime = get_seconds()" into semtimedop()
Comment 1 Manfred Spraul 2013-10-02 07:18:01 UTC
Fixed

0e8c665699e953fa58dc1b0b0d09e5dce7343cc7 ipc/sem.c: update sem_otime for all operations

Note You need to log in before you can comment on or make changes to this bug.