]> git.michaelhowe.org Git - packages/o/openafs.git/commit
rxevent: prevent negative rx_connection refCount
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 17:36:59 +0000 (13:36 -0400)
commit0c8551135a6be6e81d79eeb117be43a0b783d7be
tree624f5fad5310bc96dbc7dbcb4390693ec30bbae9
parentec4488afc260238ca0a8af33cd71b9b5df8ee14d
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').

Reviewed-on: https://gerrit.openafs.org/13228
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit b1ad473be01162fe9b3835544a835c4dcf0fcb35)

Change-Id: Ice5856627f4f77b5ede3a84fef4b6f2915f5477d
Reviewed-on: https://gerrit.openafs.org/13229
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/rx/rx.c