android_kernel_samsung_msm8976/drivers/remoteproc
Arnd Bergmann 2ed0426bd1 remoteproc: avoid stack overflow in debugfs file
commit 92792e48e2ae6051af30468a87994b5432da2f06 upstream.

Recent gcc versions warn about reading from a negative offset of
an on-stack array:

drivers/remoteproc/remoteproc_debugfs.c: In function 'rproc_recovery_write':
drivers/remoteproc/remoteproc_debugfs.c:167:9: warning: 'buf[4294967295u]' may be used uninitialized in this function [-Wmaybe-uninitialized]

I don't see anything in sys_write() that prevents us from
being called with a zero 'count' argument, so we should
add an extra check in rproc_recovery_write() to prevent the
access and avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2e37abb89a ("remoteproc: create a 'recovery' debugfs entry")
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19 14:22:37 -08:00
..
Kconfig This pull request contains: 2013-05-07 14:04:56 -07:00
Makefile remoteproc/davinci: add a remoteproc driver for OMAP-L13x DSP 2013-04-15 09:23:40 +03:00
da8xx_remoteproc.c remoteproc/davinci: add a remoteproc driver for OMAP-L13x DSP 2013-04-15 09:23:40 +03:00
omap_remoteproc.c Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
omap_remoteproc.h remoteproc/omap: add a remoteproc driver for OMAP4 2012-02-08 22:53:47 +02:00
remoteproc_core.c This pull request contains: 2013-05-07 14:04:56 -07:00
remoteproc_debugfs.c remoteproc: avoid stack overflow in debugfs file 2016-02-19 14:22:37 -08:00
remoteproc_elf_loader.c remoteproc: add find_loaded_rsc_table firmware ops 2013-04-05 08:49:52 +03:00
remoteproc_internal.h remoteproc: add find_loaded_rsc_table firmware ops 2013-04-05 08:49:52 +03:00
remoteproc_virtio.c remoteproc: support virtio config space. 2013-04-07 14:06:17 +03:00
ste_modem_rproc.c This pull request contains: 2013-05-07 14:04:56 -07:00