]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Rx: Avoid lastBusy/PEER_BUSY discrepancy
authorAndrew Deason <adeason@sinenomine.net>
Mon, 13 Feb 2012 20:11:36 +0000 (14:11 -0600)
committerDerrick Brashear <shadow@dementix.org>
Thu, 23 Feb 2012 17:33:19 +0000 (09:33 -0800)
commit390d0108b37278772835205e1a9f632d9de8dfb5
tree7bea0730248c8dba2b283caf5ef4928c06e792a4
parent7a42c8f7ec6e6865a770c9bd7dbafa48947018a8
Rx: Avoid lastBusy/PEER_BUSY discrepancy

If an rx call has the RX_CALL_PEER_BUSY flag set, but the call's
conn->lastBusy is not set, we can easily cause an rx caller to loop
infinitely. rx_NewCall will see that lastBusy for a call channel is
not set, and will use that call channel, but rxi_CheckBusy will note
that the call appears busy and that there are non-busy call channels
on the same conn, and so will return RX_CALL_BUSY.

This can currently happen in rxi_ResetCall, since we set
RX_CALL_PEER_BUSY on the call again if the call had that flag set when
rxi_ResetCall was called. If we are calling rxi_ResetCall with
'newcall' set, the passed in call is unrelated to the new call, since
it was obtained from the free list. Thus, the busy-ness of the call
should be ignored. Fix this by only paying attention to the incoming
RX_CALL_PEER_BUSY flag if 'newcall' is not set.

Also prevent this from happening by clearing RX_CALL_PEER_BUSY in
rx_NewCall when we select a call and clear lastBusy for that call.

Reviewed-on: http://gerrit.openafs.org/6707
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 2a4c6c3b9e1dc30d5599e67e02237a1aeef8a0f0)

Change-Id: I60d76469bc3dcf764e67524f39b3c55894e7ce99
Reviewed-on: http://gerrit.openafs.org/6763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/rx/rx.c