The following commit has been merged in the openafs-stable-1_6_x branch:
commit 50ae4225500d255b1f05de5ca8c763383fe178fe
Author: Mark Vitale <[email protected]>
Date:   Mon Feb 9 18:16:16 2015 -0500

    pioctl.c: restore required result variable
    
    Commit b9fb9c62a6779aa997259ddf2a83a90b08e04d5f refactored lpioctl()
    so that LINUX would have its own implementation. This also simplified
    the other lpioctl() implementations by removing superfluous variable
    'rval'.
    
    Unfortunately, 'rval' was actually required for both DARWIN and SUN511.
    On both of these platforms, the address of 'errcode' is passed
    to the respective ioctl_*() routine so its value may be passed back
    to lpioctl().   Therefore, 'errcode' must not also be used for the
    return value from these functions;  doing so results in the return
    value from the function overwriting the intended value of 'errcode' upon
    return to lpioctl().
    
    In the case of Solaris 11, ioctl_sun_afs_syscall() always returns zero
    (as long as the ioctl device 'dev/afs' opened successfully).
    So 'errcode' was always being set to zero, even if the pioctl had
    actually failed.  For example, without this fix, 'fs listcells'
    loops forever on Solaris 11, listing an infinite number of "cells",
    because it will never "see" the EDOM that informs it of the last defined
    cell.
    
    Partially revert b9fb9c62a6779aa997259ddf2a83a90b08e04d5f by restoring
    the 'rval' variable and logic for DARWIN and SUN511.
    
    Reviewed-on: http://gerrit.openafs.org/11734
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Chas Williams - CONTRACTOR <[email protected]>
    Reviewed-by: Jeffrey Altman <[email protected]>
    (cherry picked from commit 7ae8e64d1ee79c23da96c326111fdc40015ed5a6)
    
    Change-Id: I6a4b8817f02522144b3adbbae06b3737e6c62585
    Reviewed-on: http://gerrit.openafs.org/11795
    Reviewed-by: Daria Phoebe Brashear <[email protected]>
    Reviewed-by: Mark Vitale <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Stephan Wiesand <[email protected]>

 src/sys/pioctl.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to