Re: [PATCH] ntfs3: provide block_invalidate_folio to fix memory leak

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

 



On Mon, May 30, 2022 at 08:57:15AM -0400, Mikulas Patocka wrote:
> In the kernel 5.17 and before, if the "invalidatepage" method is NULL, the 
> kernel will use block_invalidatepage (see do_invalidatepage). So, we don't 
> have to provide explicit "invalidatepage" in 5.17 and before and we don't 
> have to backport this bugfix there.
> 
> Note that the commit 7ba13abbd31e contains this piece of code:
> -#ifdef CONFIG_BLOCK
> -	if (!invalidatepage)
> -		invalidatepage = block_invalidatepage;
> -#endif
> 
> So, it explicitly breaks filesystems that have NULL invalidatepage and 
> NULL invalidate_folio and that relied on block_invalidatepage being called 
> implicitly. So, I believe this commit is the root cause of this bug.

Oh, right, I missed ntfs3 in that commit.  Oops.

Acked-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>




[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