Re: [PATCH 1/1] mm: Add folio_map_local()

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

 



On Mon, Oct 31, 2022 at 03:11:38PM +0000, David Howells wrote:
> Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> wrote:
> 
> > +static inline __must_check void *folio_map_local(struct folio *folio)
> > +{
> > +	might_alloc(GFP_KERNEL);
> > +
> > +	if (!IS_ENABLED(CONFIG_HIGHMEM))
> > +		return folio_address(folio);
> 
> Can you make the might_alloc() contingent on CONFIG_HIGHMEM=y?

... so that 64-bit builds can inadvertently introduce bugs?  Either it's
safe to do GFP_KERNEL allocations from a given context, or it's not.
That's not going to depend on CONFIG_HIGHMEM.



[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