linux/drivers/remoteproc
Arnd Bergmann 92792e48e2 remoteproc: avoid stack overflow in debugfs file
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>
2015-11-26 10:07:53 +02:00
..
da8xx_remoteproc.c remoteproc/davinci: fix quoted split string checkpatch warning 2015-05-02 11:04:56 +03:00
Kconfig remoteproc/wkup_m3: add a remoteproc driver for TI Wakeup M3 2015-06-17 09:58:08 +03:00
Makefile remoteproc/wkup_m3: add a remoteproc driver for TI Wakeup M3 2015-06-17 09:58:08 +03:00
omap_remoteproc.c remoteproc: add IOMMU hardware capability flag 2015-03-12 10:43:26 +02:00
omap_remoteproc.h remoteproc/omap: add a remoteproc driver for OMAP4 2012-02-08 22:53:47 +02:00
remoteproc_core.c remoteproc: fix !CONFIG_OF build breakage 2015-06-18 11:44:41 +03:00
remoteproc_debugfs.c remoteproc: avoid stack overflow in debugfs file 2015-11-26 10:07:53 +02: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: fix various checkpatch warnings 2015-05-02 11:07:34 +03:00
remoteproc_virtio.c virtio: allow finalize_features to fail 2014-12-09 16:32:32 +02:00
ste_modem_rproc.c remoteproc/ste: add blank lines after declarations 2015-05-02 11:03:07 +03:00
wkup_m3_rproc.c remoteproc/wkup_m3: add a remoteproc driver for TI Wakeup M3 2015-06-17 09:58:08 +03:00