[PATCH v2] drivers/gpu/vga: allocate vga_arb_write() buffer on stack

2016-11-15 Thread Daniel Vetter
On Mon, Nov 14, 2016 at 10:11:47AM +0100, Dmitry Vyukov wrote: > On Fri, Oct 14, 2016 at 3:22 PM, Dmitry Vyukov wrote: > > Size of kmalloc() in vga_arb_write() is controlled by user. > > Too large kmalloc() size triggers WARNING message on console. > > Allocate the buffer on stack to avoid the

[PATCH v2] drivers/gpu/vga: allocate vga_arb_write() buffer on stack

2016-11-14 Thread Dmitry Vyukov
On Fri, Oct 14, 2016 at 3:22 PM, Dmitry Vyukov wrote: > Size of kmalloc() in vga_arb_write() is controlled by user. > Too large kmalloc() size triggers WARNING message on console. > Allocate the buffer on stack to avoid the WARNING. > The string must be small (e.g "target PCI:domain:bus:dev.fn").

[PATCH v2] drivers/gpu/vga: allocate vga_arb_write() buffer on stack

2016-10-14 Thread Dmitry Vyukov
Size of kmalloc() in vga_arb_write() is controlled by user. Too large kmalloc() size triggers WARNING message on console. Allocate the buffer on stack to avoid the WARNING. The string must be small (e.g "target PCI:domain:bus:dev.fn"). Signed-off-by: Dmitry Vyukov Reviewed-by: Ville Syrjälä