Skip to content

Commit

Permalink
rxrpc: Fix some missing _bh annotations on locking conn->state_lock
Browse files Browse the repository at this point in the history
conn->state_lock may be taken in softirq mode, but a previous patch
replaced an outer lock in the response-packet event handling code, and lost
the _bh from that when doing so.

Fix this by applying the _bh annotation to the state_lock locking.

Fixes: a1399f8 ("rxrpc: Call channels should have separate call number spaces")
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
dhowells committed Oct 5, 2020
1 parent 9a059cd commit fa1d113
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/rxrpc/conn_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,18 +340,18 @@ static int rxrpc_process_event(struct rxrpc_connection *conn,
return ret;

spin_lock(&conn->channel_lock);
spin_lock(&conn->state_lock);
spin_lock_bh(&conn->state_lock);

if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) {
conn->state = RXRPC_CONN_SERVICE;
spin_unlock(&conn->state_lock);
spin_unlock_bh(&conn->state_lock);
for (loop = 0; loop < RXRPC_MAXCALLS; loop++)
rxrpc_call_is_secure(
rcu_dereference_protected(
conn->channels[loop].call,
lockdep_is_held(&conn->channel_lock)));
} else {
spin_unlock(&conn->state_lock);
spin_unlock_bh(&conn->state_lock);
}

spin_unlock(&conn->channel_lock);
Expand Down

0 comments on commit fa1d113

Please sign in to comment.