• Eric W. Biederman's avatar
    sysctl: Factor out sysctl_data. · 49a0c458
    Eric W. Biederman authored
    There as been no easy way to wrap the default sysctl strategy routine except
    for returning 0.  Which is not always what we want.  The few instances I have
    seen that want different behaviour have written their own version of
    sysctl_data.  While not too hard it is unnecessary code and has the potential
    for extra bugs.
    
    So to make these situations easier and make that part of sysctl more symetric
    I have factord sysctl_data out of do_sysctl_strategy and exported as a
    function everyone can use.
    
    Further having sysctl_data be an explicit function makes checking for badly
    formed sysctl tables much easier.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Cc: Alexey Dobriyan <adobriyan@sw.ru>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    49a0c458
sysctl.c 61.8 KB