<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/quota, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-10-04T14:33:03Z</updated>
<entry>
<title>quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed</title>
<updated>2024-10-04T14:33:03Z</updated>
<author>
<name>Kemeng Shi</name>
</author>
<published>2024-07-15T13:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65df4be8b412929cd5267bda15c65122b97bd43b'/>
<id>urn:sha1:65df4be8b412929cd5267bda15c65122b97bd43b</id>
<content type='text'>
[ Upstream commit d16a5f852025be546b6e4ceef15899db3490f4d7 ]

Avoid missing put_quota_format when DQUOT_SUSPENDED is passed to
dquot_load_quota_sb.

Link: https://patch.msgid.link/20240715130534.2112678-2-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi &lt;shikemeng@huaweicloud.com&gt;
Fixes: d44c57663723 ("quota: Remove BUG_ON in dquot_load_quota_sb()")
Reviewed-by: Joseph Qi &lt;joseph.qi@linux.alibaba.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>quota: fix to propagate error of mark_dquot_dirty() to caller</title>
<updated>2024-04-12T12:52:29Z</updated>
<author>
<name>Chao Yu</name>
</author>
<published>2024-04-12T09:49:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e2e0a79a3349b6853f572e4be4885b482f7d837'/>
<id>urn:sha1:8e2e0a79a3349b6853f572e4be4885b482f7d837</id>
<content type='text'>
in order to let caller be aware of failure of mark_dquot_dirty().

Signed-off-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240412094942.2131243-1-chao@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs: quota: use group allocation of per-cpu counters API</title>
<updated>2024-03-25T19:09:17Z</updated>
<author>
<name>Kefeng Wang</name>
</author>
<published>2024-03-25T04:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a6cb47ef05a48cec778207fff6c189de8f27a0e'/>
<id>urn:sha1:5a6cb47ef05a48cec778207fff6c189de8f27a0e</id>
<content type='text'>
Use group allocation of per-cpu counters api to accelerate
dquot_init() and simplify code.

Signed-off-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240325041240.53537-1-wangkefeng.wang@huawei.com&gt;
</content>
</entry>
<entry>
<title>quota: remove SLAB_MEM_SPREAD flag usage</title>
<updated>2024-03-05T14:15:50Z</updated>
<author>
<name>Chengming Zhou</name>
</author>
<published>2024-02-24T13:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e29dd522c1d1f1d5dc59ab300a77889d80e80995'/>
<id>urn:sha1:e29dd522c1d1f1d5dc59ab300a77889d80e80995</id>
<content type='text'>
The SLAB_MEM_SPREAD flag is already a no-op after removal of SLAB
allocator and in [1] it was fully deprecated. Remove its usage so we can
delete it from slab. No functional change.

Signed-off-by: Chengming Zhou &lt;zhouchengming@bytedance.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/all/20240223-slab-cleanup-flags-v2-1-02f1753e8303@suse.cz/
Message-Id: &lt;20240224135118.830073-1-chengming.zhou@linux.dev&gt;
</content>
</entry>
<entry>
<title>quota: Detect loops in quota tree</title>
<updated>2024-02-12T13:14:49Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2024-02-07T18:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a898cb621ac589b0b9e959309689a027e765aa12'/>
<id>urn:sha1:a898cb621ac589b0b9e959309689a027e765aa12</id>
<content type='text'>
Syzbot has found that when it creates corrupted quota files where the
quota tree contains a loop, we will deadlock when tryling to insert a
dquot. Add loop detection into functions traversing the quota tree.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>quota: Properly annotate i_dquot arrays with __rcu</title>
<updated>2024-02-08T11:04:59Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2024-02-06T14:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ccb49011bb2ebfd66164dbf68c5bff48917bb5ef'/>
<id>urn:sha1:ccb49011bb2ebfd66164dbf68c5bff48917bb5ef</id>
<content type='text'>
Dquots pointed to from i_dquot arrays in inodes are protected by
dquot_srcu. Annotate them as such and change .get_dquots callback to
return properly annotated pointer to make sparse happy.

Fixes: b9ba6f94b238 ("quota: remove dqptr_sem")
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>quota: Fix rcu annotations of inode dquot pointers</title>
<updated>2024-02-08T11:04:59Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2024-02-06T14:32:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179b8c97ebf63429589f5afeba59a181fe70603e'/>
<id>urn:sha1:179b8c97ebf63429589f5afeba59a181fe70603e</id>
<content type='text'>
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 &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202402061900.rTuYDlo6-lkp@intel.com/
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>quota: Fix potential NULL pointer dereference</title>
<updated>2024-02-05T14:57:34Z</updated>
<author>
<name>Wang Jianjian</name>
</author>
<published>2024-02-02T08:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0aa72604fbd80c8aabb46eda00535ed35570f1f'/>
<id>urn:sha1:d0aa72604fbd80c8aabb46eda00535ed35570f1f</id>
<content type='text'>
Below race may cause NULL pointer dereference

P1					P2
dquot_free_inode			quota_off
					  drop_dquot_ref
					   remove_dquot_ref
					   dquots = i_dquot(inode)
  dquots = i_dquot(inode)
  srcu_read_lock
  dquots[cnt]) != NULL (1)
					     dquots[type] = NULL (2)
  spin_lock(&amp;dquots[cnt]-&gt;dq_dqb_lock) (3)
   ....

If dquot_free_inode(or other routines) checks inode's quota pointers (1)
before quota_off sets it to NULL(2) and use it (3) after that, NULL pointer
dereference will be triggered.

So let's fix it by using a temporary pointer to avoid this issue.

Signed-off-by: Wang Jianjian &lt;wangjianjian3@huawei.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240202081852.2514092-1-wangjianjian3@huawei.com&gt;
</content>
</entry>
<entry>
<title>quota: Drop GFP_NOFS instances under dquot-&gt;dq_lock and dqio_sem</title>
<updated>2024-01-23T18:21:11Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2024-01-22T12:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1e1b2becab7c0b23f18b7999a3b48f76210d3a6'/>
<id>urn:sha1:a1e1b2becab7c0b23f18b7999a3b48f76210d3a6</id>
<content type='text'>
Quota code acquires dquot-&gt;dq_lock whenever reading / writing dquot.
When reading / writing quota info we hold dqio_sem.  Since these locks
can be acquired during inode reclaim (through dquot_drop() -&gt; dqput() -&gt;
dquot_release()) we are setting nofs allocation context whenever
acquiring these locks. Hence there's no need to use GFP_NOFS allocations
in quota code doing IO. Just switch it to GFP_KERNEL.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>quota: Set nofs allocation context when acquiring dqio_sem</title>
<updated>2024-01-23T18:21:11Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2024-01-22T12:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c5026c1ef5b57a8d1ddeb6f2bf0c1624d6a849f'/>
<id>urn:sha1:6c5026c1ef5b57a8d1ddeb6f2bf0c1624d6a849f</id>
<content type='text'>
dqio_sem can be acquired during inode reclaim through dquot_drop() -&gt;
dqput() -&gt; dquot_release() -&gt; write_file_info() context. In some cases
(most notably through dquot_get_next_id()) it can be acquired without
holding dquot-&gt;dq_lock (which already sets nofs allocation context). So
we need to set nofs allocation context when acquiring it as well.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
