]> git.itanic.dy.fi Git - linux-stable/commit
quota: Fix rcu annotations of inode dquot pointers
authorJan Kara <jack@suse.cz>
Tue, 6 Feb 2024 14:32:09 +0000 (15:32 +0100)
committerJan Kara <jack@suse.cz>
Thu, 8 Feb 2024 11:04:59 +0000 (12:04 +0100)
commit179b8c97ebf63429589f5afeba59a181fe70603e
treeb563c3feb41730d5096c3f742b71c73f4ab2f3af
parent4243bf80c79211a8ca2795401add9c4a3b1d37ca
quota: Fix rcu annotations of inode dquot pointers

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: b9ba6f94b238 ("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>
fs/quota/dquot.c