]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:31:21 +0000 (07:31 +0100)
commitac239fccf5a5c514fb5fda9043e08dfad2d42543
treed96e62a93f6fc088622d8199fd6c06aad349a8b7
parenta78d278e01b1b608f90077258debc7a98de51482
afs: Fix afs_server_list to be cleaned up with RCU

[ Upstream commit e6bace7313d61e31f2b16fa3d774fd8cb3cb869e ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/internal.h
fs/afs/server_list.c