• Jeff Layton's avatar
    sunrpc: get rid of use_gssp_lock · 0fdc2678
    Jeff Layton authored
    We can achieve the same result with a cmpxchg(). This also fixes a
    potential race in use_gss_proxy(). The value of sn->use_gss_proxy could
    go from -1 to 1 just after we check it in use_gss_proxy() but before we
    acquire the spinlock. The procfile write would end up returning success
    but the value would flip to 0 soon afterward. With this method we not
    only avoid locking but the first "setter" always wins.
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    0fdc2678
svcauth_gss.c 45.5 KB