linux-stable/fs/quota
Jan Kara 00b07b4962 quota: Fix rcu annotations of inode dquot pointers
[ Upstream commit 179b8c97eb ]

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: b9ba6f94b2 ("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>
2024-03-26 18:22:20 -04:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat.c fs/quota: use COMPAT_SYSCALL_DEFINE for sys32_quotactl() 2018-04-02 20:15:47 +02:00
dquot.c quota: Fix rcu annotations of inode dquot pointers 2024-03-26 18:22:20 -04:00
kqid.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netlink.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quota.c quota: honor quota type in Q_XGETQSTAT[V] calls 2019-06-25 17:51:35 +02:00
quota_tree.c quota: Check next/prev free block number after reading from quota file 2022-10-26 13:22:14 +02:00
quota_tree.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quota_v1.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
quota_v2.c quota: Fix memory leak when handling corrupted quota file 2021-03-04 10:26:26 +01:00
quotaio_v1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quotaio_v2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00