Re: [PATCH] filemap: check for folio order < mapping min order

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

 



On Thu, Feb 20, 2025 at 11:24:26PM +0000, Matthew Wilcox wrote:
> On Thu, Feb 20, 2025 at 03:40:33PM -0500, Kent Overstreet wrote:
> > accidentally inserting a folio < mapping min order causes the readahead
> > code to go into an infinite loop, which is unpleasant.
> 
> We already have:
> 
>         VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping),
>                         folio);

WARN_ON() and returning an error is a bit more appropriate here, don't
you think?

> If you're not enabling CONFIG_DEBUG_VM in your testing, I think that's
> an oversight on your part.

Fastpath and expensive asserts should certainly be behind a config
option, but I don't think this one should be.

There's too many subsystem specific debug modes to test the full matrix
of all of them, which means there are things that make it past our
testing and we need to be able to catch them in the wild or on realistic
test configurations. In practice, subsystems need to have a subset of
judiciously chosen asserts that are always on.




[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