Commit 2d1b26c7 authored by Jan Kara's avatar Jan Kara Committed by Baokun Li
Browse files

quota: Fix rcu annotations of inode dquot pointers

stable inclusion
from stable-v4.19.311
commit 06172dff9a47e76dfce9b60d44ef21131b417803
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IA8B9H
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=06172dff9a47e76dfce9b60d44ef21131b417803



--------------------------------

[ Upstream commit 179b8c97ebf63429589f5afeba59a181fe70603e ]

Dquot pointers in i_dquot array in the inode are protected by
dquot_srcu. Annotate the array pointers with __rcu, perform the locked
dereferences with srcu_dereference_check() instead of plain reads, and
set the array elements with rcu_assign_pointer().

Fixes: b9ba6f94 ("quota: remove dqptr_sem")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402061900.rTuYDlo6-lkp@intel.com/


Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent ed185557
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment