afs: Fix afs_server_list to be cleaned up with RCU
authorDavid Howells <dhowells@redhat.com>
Thu, 2 Nov 2023 16:26:59 +0000 (16:26 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 17 Nov 2023 07:55:27 +0000 (07:55 +0000)
commite6bace7313d61e31f2b16fa3d774fd8cb3cb869e
treec2416f043af3983d23ba5688bc64d40ae36b8d29
parent76df934c6d5f5c93ba7a0112b1818620ddc10b19
afs: Fix afs_server_list to be cleaned up with RCU

afs_server_list is accessed with the rcu_read_lock() held from
volume->servers, so it needs to be cleaned up correctly.

Fix this by using kfree_rcu() instead of kfree().

Fixes: 8a070a964877 ("afs: Detect cell aliases 1 - Cells with root volumes")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
fs/afs/internal.h
fs/afs/server_list.c