Re: [PATCH 1/2] mm: add GFP mask param to strndup_user

2020-08-16 Thread Alexey Dobriyan
On Sat, Aug 15, 2020 at 11:42:10PM +0100, Al Viro wrote: > On Sat, Aug 15, 2020 at 11:23:43AM -0700, Pascal Bouchareine wrote: > > Let caller specify allocation. > > Preserve existing calls with GFP_USER. > > Bloody bad idea, unless you slap a BUG_ON(flags & GFP_ATOMIC) on it, > to make sure

Re: [PATCH 1/2] mm: add GFP mask param to strndup_user

2020-08-15 Thread Al Viro
On Sat, Aug 15, 2020 at 11:23:43AM -0700, Pascal Bouchareine wrote: > Let caller specify allocation. > Preserve existing calls with GFP_USER. Bloody bad idea, unless you slap a BUG_ON(flags & GFP_ATOMIC) on it, to make sure nobody tries _that_. Note that copying from userland is an inherently

[PATCH 1/2] mm: add GFP mask param to strndup_user

2020-08-15 Thread Pascal Bouchareine
Let caller specify allocation. Preserve existing calls with GFP_USER. Signed-off-by: Pascal Bouchareine --- drivers/dma-buf/dma-buf.c | 2 +- drivers/gpu/drm/i915/i915_debugfs_params.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c | 3 +- drivers/input/misc/uinput.c