HID: battery: don't do DMA from stack
authorJiri Kosina <jkosina@suse.cz>
Mon, 2 Sep 2013 11:43:00 +0000 (13:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 00:18:16 +0000 (17:18 -0700)
commit65a839f4b7fd73d2a84c2d404c94a162751e8edb
tree599edcef6d7f5b5cd0f990950586868324fb1ea1
parent69f2af2ddcfd0d9984e764bdf0953a8d9248755a
HID: battery: don't do DMA from stack

commit 6c2794a2984f4c17a58117a68703cc7640f01c5a upstream.

Instead of using data from stack for DMA in hidinput_get_battery_property(),
allocate the buffer dynamically.

Reported-by: Richard Ryniker <ryniker@alum.mit.edu>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-input.c