Re: [PATCH 1/7] mm: shmem: correctly pass alloced parameter to shmem_recalc_inode() to avoid WARN_ON()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




on 6/6/2025 9:28 AM, Andrew Morton wrote:
> On Fri, 6 Jun 2025 09:11:37 +0800 Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> wrote:
> 
>>>> --- a/mm/shmem.c
>>>> +++ b/mm/shmem.c
>>>> @@ -2145,7 +2145,7 @@ static void shmem_set_folio_swapin_error(struct inode *inode, pgoff_t index,
>>>>  	 * won't be 0 when inode is released and thus trigger WARN_ON(i_blocks)
>>>>  	 * in shmem_evict_inode().
>>>>  	 */
>>>> -	shmem_recalc_inode(inode, -nr_pages, -nr_pages);
>>>> +	shmem_recalc_inode(inode, 0, -nr_pages);
>>>>  	swap_free_nr(swap, nr_pages);
>>>>  }
>>>
>>> Huh, three years ago.  What do we think might be the userspace-visible
>>> runtime effects of this?
>> This could trigger WARN_ON(i_blocks) in shmem_evict_inode() as i_blocks
>> is supposed to be dropped in the quota free routine.
> 
> I don't believe we've seen such a report in those three years so perhaps
> no need to backport.  But it's a one-liner so let's backport ;) And
> possibly [2/7] and [3/7] should receive the same treatment.
> 
> I don't think any of these need to be fast-tracked into mm-hotfixes so
> please resend after a suitable review period and include the cc:stable
> on those which -stable needs.
> 
Sure, all issues are hard to trigger. I will resend this series later.
Thanks!





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux