Skip to content

Commit

Permalink
afs: Fix the setting of the server responding flag
Browse files Browse the repository at this point in the history
In afs_wait_for_operation(), we set transcribe the call responded flag to
the server record that we used after doing the fileserver iteration loop -
but it's possible to exit the loop having had a response from the server
that we've discarded (e.g. it returned an abort or we started receiving
data, but the call didn't complete).

This means that op->server might be NULL, but we don't check that before
attempting to set the server flag.

Fixes: 98f9fda ("afs: Fold the afs_addr_cursor struct in")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20240923150756.902363-7-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
  • Loading branch information
David Howells authored and Christian Brauner committed Sep 27, 2024
1 parent 19dcfb9 commit ff98751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/afs/fs_operation.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void afs_wait_for_operation(struct afs_operation *op)
}
}

if (op->call_responded)
if (op->call_responded && op->server)
set_bit(AFS_SERVER_FL_RESPONDING, &op->server->flags);

if (!afs_op_error(op)) {
Expand Down

0 comments on commit ff98751

Please sign in to comment.