An undercounted afs_conn can easily cause a panic and/or memory
corruption later on, since we put an rx_connection reference with each
afs_conn reference. Panic as soon as we detect this, as this indicates
a serious bug.
Reviewed-on: http://gerrit.openafs.org/6413
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
8a574ba16a80fc2b8b703ddcfc99486b977e6071)
Change-Id: Ibd60dafdf1a800349b73754dae18666fa0edd300
Reviewed-on: http://gerrit.openafs.org/6642
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
{
AFS_STATCNT(afs_PutConn);
ac->refCount--;
+ if (ac->refCount < 0) {
+ osi_Panic("afs_PutConn: refcount imbalance 0x%lx %d",
+ (unsigned long)(uintptrsz)ac, (int)ac->refCount);
+ }
rx_PutConnection(rxconn);
} /*afs_PutConn */