]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Fix sys_ipc() SEMCTL on sparc64.
authorDavid S. Miller <davem@davemloft.net>
Wed, 10 Oct 2007 10:22:30 +0000 (03:22 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 2 Nov 2007 15:44:10 +0000 (08:44 -0700)
commite43358c5c81a6b7be8d55af6d736e05aa3d8ceb7
treefa5987ce9373a54e49f1f95582607d552e921962
parent791333baf11dbf37dd8f566909f8c1d5b939bf04
Fix sys_ipc() SEMCTL on sparc64.

changeset 6536a6b331d3225921c398eb7c6e4ecedb9b05e0 from mainline

Thanks to Tom Callaway for the excellent bug report and
test case.

sys_ipc() has several problems, most to due with semaphore
call handling:

1) 'err' return should be a 'long'
2) "union semun" is passed in a register on 64-bit compared
   to 32-bit which provides it on the stack and therefore
   by reference
3) Second and third arguments to SEMCTL are swapped compared
   to 32-bit.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/sys_sparc.c