On Fri, Jul 19, 2024 at 7:37 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Fri, Jul 19, 2024 at 09:02:01AM +0200, Michal Hocko wrote: > > > Additionally, at least drivers/vdpa/vdpa_user/iova_domain.c is > > > incorrect with GFP_ATOMIC > > > | __GFP_NOFAIL. > > > > This is broken! Please bring this up with the maintainer of the code. > > No the only issue in this vdpa mess :( > > But I wonder if we should have a macro/BUILD_BUG_ON magic to catch > totally obvious bugs like this. I doubt this is going to work as users can use a variant to save gfp_flags. On the other hand, isn't it necessarily a bug of vdpa, why can't it be mm? if mm disallows GFP_NOFAIL, there must be a doc to say that; if it allows, we should never return NULL. >