When the provided config size if beyond kmalloc limits, it may raise a
WARN_ON. Avoid this by tagging the allocation with __GFP_NOWARN. Also
properly tag it as GFP_USER instead of GFP_KERNEL.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
if (copy_from_user(&cell_params, arg, sizeof(cell_params)))
return -EFAULT;
- config = kmalloc(cell_params.config_size, GFP_KERNEL | GFP_DMA);
+ config = kmalloc(cell_params.config_size, GFP_USER | __GFP_NOWARN);
if (!config)
return -ENOMEM;