Commit 83c740ac authored by Rob Gardner's avatar Rob Gardner Committed by Luis Henriques

sparc: semtimedop() unreachable due to comparison error

commit 53eb2516 upstream.

A bug was reported that the semtimedop() system call was always
failing eith ENOSYS.

Since SEMCTL is defined as 3, and SEMTIMEDOP is defined as 4,
the comparison "call <= SEMCTL" will always prevent SEMTIMEDOP
from getting through to the semaphore ops switch statement.

This is corrected by changing the comparison to "call <= SEMTIMEDOP".

Orabug: 20633375
Signed-off-by: default avatarRob Gardner <rob.gardner@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 99fd9e23
...@@ -333,7 +333,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second ...@@ -333,7 +333,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second
long err; long err;
/* No need for backward compatibility. We can start fresh... */ /* No need for backward compatibility. We can start fresh... */
if (call <= SEMCTL) { if (call <= SEMTIMEDOP) {
switch (call) { switch (call) {
case SEMOP: case SEMOP:
err = sys_semtimedop(first, ptr, err = sys_semtimedop(first, ptr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment