• David S. Miller's avatar
    Fix sys_ipc() SEMCTL on sparc64. · e43358c5
    David S. Miller authored
    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: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    e43358c5
sys_sparc.c 23.4 KB