]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kcmp: In get_file_raw_ptr use task_lookup_fd_rcu
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 20 Nov 2020 23:14:30 +0000 (17:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:48 +0000 (14:52 +0200)
commit6007aeeaefb31b22b66e1f7c4dc5dc49c5ab6e98
tree07c37a975e88fde3ee5c7841e0caf8fea5efa159
parentc2291f7bdf25d655e80da628a2512f3ffb44db9b
kcmp: In get_file_raw_ptr use task_lookup_fd_rcu

[ Upstream commit ed77e80e14a3cd55c73848b9e8043020e717ce12 ]

Modify get_file_raw_ptr to use task_lookup_fd_rcu.  The helper
task_lookup_fd_rcu does the work of taking the task lock and verifying
that task->files != NULL and then calls files_lookup_fd_rcu.  So let
use the helper to make a simpler implementation of get_file_raw_ptr.

Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Link: https://lkml.kernel.org/r/20201120231441.29911-13-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/kcmp.c