drivers/gpu/vga: allocate vga_arb_write() buffer on stack
authorDmitry Vyukov <dvyukov@google.com>
Fri, 14 Oct 2016 13:22:22 +0000 (15:22 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Oct 2016 06:21:14 +0000 (08:21 +0200)
commit49521b13cbc02aff9ac1fff8d425055cc86cef08
tree3ab90884b6ace4be6fd89eb6ee5d0d13e4f0a177
parent0853695c3ba46f97dfc0b5885f7b7e640ca212dd
drivers/gpu/vga: allocate vga_arb_write() buffer on stack

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 <dvyukov@google.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: syzkaller@googlegroups.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1476451342-146510-1-git-send-email-dvyukov@google.com
drivers/gpu/vga/vgaarb.c