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:21:46 +0000 (17:21 -0700)
commitf0c298af1d7ac27bef191a8593c14244341efb01
tree9d5c41db10f72e8ded66f265e932a05d2b5524b2
parent6794022829cf3bea51a4dc9c4e1ca94a42aaa677
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