WSL2-Linux-Kernel/net/sunrpc/auth_gss
Arnd Bergmann cc6a7aab55 sunrpc: avoid warning in gss_key_timeout
The gss_key_timeout() function causes a harmless warning in some
configurations, e.g. ARM imx_v6_v7_defconfig with gcc-5.2, if the
compiler cannot figure out the state of the 'expire' variable across
an rcu_read_unlock():

net/sunrpc/auth_gss/auth_gss.c: In function 'gss_key_timeout':
net/sunrpc/auth_gss/auth_gss.c:1422:211: warning: 'expire' may be used uninitialized in this function [-Wmaybe-uninitialized]

To avoid this warning without adding a bogus initialization, this
rewrites the function so the comparison is done inside of the
critical section. As a side-effect, it also becomes slightly
easier to understand because the implementation now more closely
resembles the comment above it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c5e6aecd03 ("sunrpc: fix RCU handling of gc_ctx field")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2015-10-23 15:57:28 -04:00
..
Makefile
auth_gss.c sunrpc: avoid warning in gss_key_timeout 2015-10-23 15:57:28 -04:00
gss_generic_token.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_crypto.c sunrpc: use sg_init_one() in krb5_rc4_setup_enc/seq_key() 2015-06-22 14:15:06 -04:00
gss_krb5_keys.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_mech.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_seal.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_seqnum.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_unseal.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_krb5_wrap.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_mech_switch.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
gss_rpc_upcall.c svcrpc: fix memory leak in gssp_accept_sec_context_upcall 2015-02-17 18:09:02 -05:00
gss_rpc_upcall.h Merge branch 'nfs-for-next' of git://linux-nfs.org/~trondmy/nfs-2.6 into for-3.10 2013-04-29 16:23:34 -04:00
gss_rpc_xdr.c svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures 2015-05-04 12:02:40 -04:00
gss_rpc_xdr.h sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
svcauth_gss.c sunrpc: integer underflow in rsc_parse() 2015-02-26 15:40:16 -05:00