Skip to content

Commit f963f62

Browse files
akpm00hnaz
authored andcommitted
ipc-sem-simplify-wait-wake-loop-checkpatch-fixes
WARNING: line over 80 characters torvalds#69: FILE: ipc/sem.c:1997: + * fastpath: the semop has completed, either successfully or not, from WARNING: line over 80 characters #70: FILE: ipc/sem.c:1998: + * the syscall pov, is quite irrelevant to us at this point; we're done. WARNING: line over 80 characters torvalds#73: FILE: ipc/sem.c:2001: + * spuriously. The queue.status is checked again in the slowpath (aka WARNING: line over 80 characters torvalds#74: FILE: ipc/sem.c:2002: + * after taking sem_lock), such that we can detect scenarios where we WARNING: line over 80 characters torvalds#75: FILE: ipc/sem.c:2003: + * were awakened externally, during the window between wake_q_add() and WARNING: line over 80 characters torvalds#84: FILE: ipc/sem.c:2009: + * User space could assume that semop() is a memory barrier: WARNING: line over 80 characters torvalds#85: FILE: ipc/sem.c:2010: + * Without the mb(), the cpu could speculatively read in user WARNING: line over 80 characters torvalds#86: FILE: ipc/sem.c:2011: + * space stale data that was overwritten by the previous owner total: 0 errors, 8 warnings, 127 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/ipc-sem-simplify-wait-wake-loop.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Davidlohr Bueso <[email protected]> Cc: Manfred Spraul <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent b300534 commit f963f62

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

ipc/sem.c

+11-10
Original file line numberDiff line numberDiff line change
@@ -1994,22 +1994,23 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
19941994
schedule();
19951995

19961996
/*
1997-
* fastpath: the semop has completed, either successfully or not, from
1998-
* the syscall pov, is quite irrelevant to us at this point; we're done.
1997+
* fastpath: the semop has completed, either successfully or
1998+
* not, from the syscall pov, is quite irrelevant to us at this
1999+
* point; we're done.
19992000
*
20002001
* We _do_ care, nonetheless, about being awoken by a signal or
2001-
* spuriously. The queue.status is checked again in the slowpath (aka
2002-
* after taking sem_lock), such that we can detect scenarios where we
2003-
* were awakened externally, during the window between wake_q_add() and
2004-
* wake_up_q().
2002+
* spuriously. The queue.status is checked again in the
2003+
* slowpath (aka after taking sem_lock), such that we can detect
2004+
* scenarios where we were awakened externally, during the
2005+
* window between wake_q_add() and wake_up_q().
20052006
*/
20062007
error = READ_ONCE(queue.status);
20072008
if (error != -EINTR) {
20082009
/*
2009-
* User space could assume that semop() is a memory barrier:
2010-
* Without the mb(), the cpu could speculatively read in user
2011-
* space stale data that was overwritten by the previous owner
2012-
* of the semaphore.
2010+
* User space could assume that semop() is a memory
2011+
* barrier: Without the mb(), the cpu could
2012+
* speculatively read in userspace stale data that was
2013+
* overwritten by the previous owner of the semaphore.
20132014
*/
20142015
smp_mb();
20152016
goto out_free;

0 commit comments

Comments
 (0)