OpenAFS Master Repository branch, openafs-stable-1_4_x, updated. openafs-stable-1_4_12-132-g0dd5b8a

Gerrit Code Review gerrit@openafs.org
Sat, 29 Oct 2011 20:04:57 -0700 (PDT)


The following commit has been merged in the openafs-stable-1_4_x branch:
commit 0dd5b8a1246da13d4e9911a73e5e9bcaee15babb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date:   Tue Mar 15 00:45:45 2011 +0000

    Linux: Fix return codes from setpag
    
    Linux is a real stickler when it comes to error codes. Functions
    which return positive error codes into the kernel tend to have
    unfortunate effects. Because all AFS errors tend to be positive,
    most of our kernel entry points negate errors before passing them
    back to their caller.
    
    This causes problems when internal functions themselves return
    negative error codes. This was the case with the keyring functions,
    which ended up returning a negative code to setpag(), this handed
    that code ultimately up to the ioctl handler, which negated it (so
    turning it positive) before throwing it up to the kernel.
    
    The kernel sees this positive value as being a successful return,
    and so passes it direct to userland, rather than assigning it to
    errno. This led to the setpag() userspace function never being
    aware of keyring errors that had occurred in the kernel.
    
    Fix all this by making sure that all errors from the keyring code
    are made positive before being passed upwards in the kernel module.
    
    Reviewed-on: http://gerrit.openafs.org/4223
    Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
    Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>
    (cherry picked from commit 3d92852ba99bc7591515992dfea3436d93c23b85)
    
    Change-Id: I197e963b9da6ba89a48998477ffda61b98903eb1
    Reviewed-on: http://gerrit.openafs.org/5728
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/afs/LINUX/osi_groups.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

-- 
OpenAFS Master Repository