From: Michael Meffie Date: Tue, 11 Mar 2014 16:40:33 +0000 (-0400) Subject: libafs: reset global icl set pointers on shutdown X-Git-Tag: upstream/1.6.8^2~14 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f59acadef1f0278fe37f1ad2b07912a0308b2294;p=packages%2Fo%2Fopenafs.git libafs: reset global icl set pointers on shutdown Avoid panicking when an icl tracing function is called after shutdown_icl. There is a window during shutdown in which pioctls can be requested after the shutdown_icl is issued. Reset the global icl set pointers so tracing is disabled after the shutdown_icl, instead of using pointers to freed memory. Removed the unneeded afs_icl_FindSet calls and use the global pointers which were set during the initialization. Reviewed-on: http://gerrit.openafs.org/10884 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 64dd6dd018eb7413636ed6416bd244bb81893d9e) Change-Id: I65671ee60e3cdf11d9921585dcd67df7cc22c88f Reviewed-on: http://gerrit.openafs.org/10932 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c index 63fa1eab5..26bf95908 100644 --- a/src/afs/afs_icl.c +++ b/src/afs/afs_icl.c @@ -55,16 +55,14 @@ shutdown_icl(void) struct afs_icl_log *logp; struct afs_icl_set *setp; - setp = afs_icl_FindSet("cm"); - if (setp) { - /* Release the reference from Find, and the initial one */ - afs_icl_SetFree(setp); + if (afs_iclSetp) { + setp = afs_iclSetp; /* "cm" */ + afs_iclSetp = NULL; afs_icl_SetFree(setp); } - setp = afs_icl_FindSet("cmlongterm"); - if (setp) { - /* Release the reference from Find, and the initial one */ - afs_icl_SetFree(setp); + if (afs_iclLongTermSetp) { + setp = afs_iclLongTermSetp; /* "cmlongterm" */ + afs_iclLongTermSetp = NULL; afs_icl_SetFree(setp); } logp = afs_icl_FindLog("cmfx");