rxevent: prevent negative rx_connection refCount 28/13228/4
authorMark Vitale <mvitale@sinenomine.net>
Sat, 30 Jun 2018 21:35:09 +0000 (17:35 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 1 Jul 2018 04:21:50 +0000 (00:21 -0400)
commitb1ad473be01162fe9b3835544a835c4dcf0fcb35
tree812e373523cfc19b78f4e74607cfd1d7b4099686
parent328590dc5669cae3db6c509871b612b0384ea33d
rxevent: prevent negative rx_connection refCount

rxi_ChallengeEvent is called directly from rxi_ChallengeOn to start the
first challenge; subsequent calls to rxi_ChallengeEvent are from the
event handler.  When called as an event, we must putConnection the
reference held by the event.  But when called directly for the first
time, the event has not been scheduled yet and so has not taken a
reference on the connection.  For this case, we must not putConnection
or the rx_connection refCount will go negative.

One reported symptom of this bug is a fileserver crash with:
  'Assertion failed! file rx.c, line 1327.'

Introduced by commit 304d758983b499dc568d6ca57b6e92df24b69de8
('Standardize rx_event usage').

Change-Id: I67122ff84ac9b1b6445ad4005e76e5f8482fd7be
Reviewed-on: https://gerrit.openafs.org/13228
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/rx/rx.c