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:kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202402061900.rTuYDlo6-lkp@intel.com/ Signed-off-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Baokun Li <libaokun1@huawei.com>
Loading
Please sign in to comment