diff options
author | Arnd Bergmann <arnd@arndb.de> | 2020-01-07 23:29:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-14 17:30:35 +0300 |
commit | caf82f727e69b647f09d57a1fc56e69d22a5f483 (patch) | |
tree | dec26a2eb22c0ef085de229d7c7b674965cbd3f3 /Documentation/devicetree/bindings/slimbus | |
parent | 34bc4f468a9fab1e8c85f05117a0d46adec2c200 (diff) | |
download | linux-caf82f727e69b647f09d57a1fc56e69d22a5f483.tar.xz |
visorbus: fix uninitialized variable access
The setup_crash_devices_work_queue function only partially initializes
the message it sends to chipset_init, leading to undefined behavior:
drivers/visorbus/visorchipset.c: In function 'setup_crash_devices_work_queue':
drivers/visorbus/visorchipset.c:333:6: error: '((unsigned char*)&msg.hdr.flags)[0]' is used uninitialized in this function [-Werror=uninitialized]
if (inmsg->hdr.flags.response_expected)
Set up the entire structure, zero-initializing the 'response_expected'
flag.
This was apparently found by the patch that added the -O3 build option
in Kconfig.
Fixes: 12e364b9f08a ("staging: visorchipset driver to provide registration and other services")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200107202950.782951-1-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/devicetree/bindings/slimbus')
0 files changed, 0 insertions, 0 deletions