]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
afs: Fix afs_find_server search loop
authorMarc Dionne <marc.dionne@auristor.com>
Sat, 12 May 2018 00:35:06 +0000 (21:35 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:58:20 +0000 (14:58 +0200)
commitbb42b54e53b16c62b62adce76d53d2c84dcf952d
tree558f1af764d46f75fdcf0eb422e9a527aee2b388
parent988da1bfcfaaebdcd8cc0ab357c80b7c152ca823
afs: Fix afs_find_server search loop

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit f9c1bba3d392843f046d2ee27b4dfcec989d8a4b ]

The code that looks up servers by addresses makes the assumption
that the list of addresses for a server is sorted.  It exits the
loop if it finds that the target address is larger than the
current candidate.  As the list is not currently sorted, this
can lead to a failure to find a matching server, which can cause
callbacks from that server to be ignored.

Remove the early exit case so that the complete list is searched.

Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/afs/server.c