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

2016-10-14 Thread Ville Syrjälä
On Fri, Oct 14, 2016 at 02:54:59PM +0200, 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

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

2016-10-14 Thread Dmitry Vyukov
On Fri, Oct 14, 2016 at 3:06 PM, Ville Syrjälä wrote: > On Fri, Oct 14, 2016 at 02:54:59PM +0200, 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] 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 Cc: Dave Airlie Cc: Ville