On Mon, Oct 10, 2022 at 01:41:57PM +0200, Guillaume Nault wrote: > However, ->sk_allocation isn't used just by the memory allocator. > In particular, sk_page_frag() uses it to figure out if it can return > the page_frag from current or if it has to use the socket one. Well, that just means sk_page_frag really needs to look at PF_MEMALLOC_* as well. So instead of reverting the proper change please fix that. A helper that looks at sk_allocation and current->flags is probably the right way to deal with that.