]> www.infradead.org Git - users/jedix/linux-maple.git/commit
afs: Fix possible infinite loop with unresponsive servers
authorMarc Dionne <marc.dionne@auristor.com>
Mon, 23 Sep 2024 15:07:49 +0000 (16:07 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 27 Sep 2024 16:29:19 +0000 (18:29 +0200)
commitf94d54208f25dc93f3bcae9e725a582380a503b1
tree7d7efc9aa4fc14d4ec59872473747c316ff5e71a
parent8a46067783bdff222d1fb8f8c20e3b7b711e3ce5
afs: Fix possible infinite loop with unresponsive servers

A return code of 0 from afs_wait_for_one_fs_probe is an indication
that the endpoint state attached to the operation is stale and has
been superseded.  In that case the iteration needs to be restarted
so that the newer probe result state gets used.

Failure to do so can result in an tight infinite loop around the
iterate_address label, where all addresses are thought to be responsive
and have been tried, with nothing to refresh the endpoint state.

Fixes: 495f2ae9e355 ("afs: Fix fileserver rotation")
Reported-by: Markus Suvanto <markus.suvanto@gmail.com>
Link: https://lists.infradead.org/pipermail/linux-afs/2024-July/008628.html
cc: linux-afs@lists.infradead.org
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20240906134019.131553-1-marc.dionne@auristor.com/
Link: https://lore.kernel.org/r/20240923150756.902363-6-dhowells@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/afs/fs_probe.c
fs/afs/rotate.c