Bug 62071

Summary: ipc/sem.c: sem_otime not updated after wait-for-zero semops that do not wait
Product: Other Reporter: Manfred Spraul (manfred)
Component: OtherAssignee: other_other
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://marc.info/?l=linux-kernel&m=137981594522009
Kernel Version: Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 62061    

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