Zero rx_multi_lock before initializing it

FreeBSD's kernel debugging facilities will panic if it detects
an attempt to re-initialize an already-initialized lock, as detected
through some particular bits being nonzero.  Zero everything out
before starting, to prevent this panic.

Change-Id: I7f3abae978d1cbe7eb4908d90c52a0dc46b81e08
Reviewed-on: http://gerrit.openafs.org/3550
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Ben Kaduk 2010-12-19 19:29:17 -05:00 committed by Derrick Brashear
parent afef1712f2
commit 37c20528df

View File

@ -42,6 +42,7 @@ multi_Init(struct rx_connection **conns, int nConns)
mh = (struct multi_handle *)osi_Alloc(sizeof(struct multi_handle));
if (!calls || !ready || !mh)
osi_Panic("multi_Rx: no mem\n");
memset(mh, 0, sizeof(struct multi_handle));
mh->calls = calls;
mh->nextReady = mh->firstNotReady = mh->ready = ready;
mh->nReady = 0;