Merge tag 'rxrpc-fixes-20200605' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorDavid S. Miller <davem@davemloft.net>
Tue, 9 Jun 2020 02:13:37 +0000 (19:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jun 2020 02:13:37 +0000 (19:13 -0700)
David Howells says:

====================
rxrpc: Fix hang due to missing notification

Here's a fix for AF_RXRPC.  Occasionally calls hang because there are
circumstances in which rxrpc generate a notification when a call is
completed - primarily because initial packet transmission failed and the
call was killed off and an error returned.  But the AFS filesystem driver
doesn't check this under all circumstances, expecting failure to be
delivered by asynchronous notification.

There are two patches: the first moves the problematic bits out-of-line and
the second contains the fix.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
net/rxrpc/peer_event.c

diff --combined net/rxrpc/peer_event.c
@@@ -271,9 -271,6 +271,9 @@@ static void rxrpc_store_error(struct rx
                break;
  
        case SO_EE_ORIGIN_ICMP6:
 +              if (err == EACCES)
 +                      err = EHOSTUNREACH;
 +              /* Fall through */
        default:
                _proto("Rx Received error report { orig=%u }", ee->ee_origin);
                break;
@@@ -292,9 -289,7 +292,7 @@@ static void rxrpc_distribute_error(stru
  
        hlist_for_each_entry_rcu(call, &peer->error_targets, error_link) {
                rxrpc_see_call(call);
-               if (call->state < RXRPC_CALL_COMPLETE &&
-                   rxrpc_set_call_completion(call, compl, 0, -error))
-                       rxrpc_notify_socket(call);
+               rxrpc_set_call_completion(call, compl, 0, -error);
        }
  }