]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix missing lock when replacing VL server list
authorDavid Howells <dhowells@redhat.com>
Tue, 7 May 2019 14:16:26 +0000 (15:16 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 15 May 2019 16:35:53 +0000 (17:35 +0100)
commit8abc26ef245539f4009cd74eb4b3030474ce896b
tree9cbdfed7205a1b2255706b1293893639b1122ba4
parent15ff6f86fb373464fc170a087e52287baa0adeba
afs: Fix missing lock when replacing VL server list

When afs_update_cell() replaces the cell->vl_servers list, it uses RCU
protocol so that proc is protected, but doesn't take ->vl_servers_lock to
protect afs_start_vl_iteration() (which does actually take a shared lock).

Fix this by making afs_update_cell() take an exclusive lock when replacing
->vl_servers.

Fixes: 0b7fbfe5a511 ("afs: Implement VL server rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/cell.c