]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
rxrpc: Fix the call timer handling
authorDavid Howells <dhowells@redhat.com>
Fri, 30 Sep 2016 08:13:50 +0000 (09:13 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 30 Sep 2016 13:40:11 +0000 (14:40 +0100)
commit405dea1debeb9956684de342903bba9ddd52f1cb
tree156258ace668125e5c2f120be62710ec8c21dfa8
parentdf0adc788ae74e35ab1a79f3db878df7fdc7db55
rxrpc: Fix the call timer handling

The call timer's concept of a call timeout (of which there are three) that
is inactive is that it is the timeout has the same expiration time as the
call expiration timeout (the expiration timer is never inactive).  However,
I'm not resetting the timeouts when they expire, leading to repeated
processing of expired timeouts when other timeout events occur.

Fix this by:

 (1) Move the timer expiry detection into rxrpc_set_timer() inside the
     locked section.  This means that if a timeout is set that will expire
     immediately, we deal with it immediately.

 (2) If a timeout is at or before now then it has expired.  When an expiry
     is detected, an event is raised, the timeout is automatically
     inactivated and the event processor is queued.

 (3) If a timeout is at or after the expiry timeout then it is inactive.
     Inactive timeouts do not contribute to the timer setting.

 (4) The call timer callback can now just call rxrpc_set_timer() to handle
     things.

 (5) The call processor work function now checks the event flags rather
     than checking the timeouts directly.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_event.c
net/rxrpc/call_object.c