Lukas Wunner
53a256a9b9
dmaengine: Fix access to uninitialized dma_slave_caps
...
dmaengine_desc_set_reuse() allocates a struct dma_slave_caps on the
stack, populates it using dma_get_slave_caps() and then accesses one
of its members.
However dma_get_slave_caps() may fail and this isn't accounted for,
leading to a legitimate warning of gcc-4.9 (but not newer versions):
In file included from drivers/spi/spi-bcm2835.c:19:0:
drivers/spi/spi-bcm2835.c: In function 'dmaengine_desc_set_reuse':
>> include/linux/dmaengine.h:1370:10: warning: 'caps.descriptor_reuse' is used uninitialized in this function [-Wuninitialized]
if (caps.descriptor_reuse) {
Fix it, thereby also silencing the gcc-4.9 warning.
The issue has been present for 4 years but surfaces only now that
the first caller of dmaengine_desc_set_reuse() has been added in
spi-bcm2835.c. Another user of reusable DMA descriptors has existed
for a while in pxa_camera.c, but it sets the DMA_CTRL_REUSE flag
directly instead of calling dmaengine_desc_set_reuse(). Nevertheless,
tag this commit for stable in case there are out-of-tree users.
Fixes: 272420214d ("dmaengine: Add DMA_CTRL_REUSE")
Reported-by: kbuild test robot <lkp@intel.com >
Signed-off-by: Lukas Wunner <lukas@wunner.de >
Cc: stable@vger.kernel.org # v4.3+
Link: https://lore.kernel.org/r/ca92998ccc054b4f2bfd60ef3adbab2913171eac.1575546234.git.lukas@wunner.de
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2019-12-11 16:03:20 +05:30
..
2019-11-16 21:51:42 -08:00
2019-11-27 22:28:37 +01:00
2019-11-27 08:15:00 -08:00
2019-11-14 16:03:35 +05:30
2019-12-05 11:43:31 -08:00
2019-10-31 14:19:45 -07:00
2019-11-22 19:56:20 +00:00
2019-11-03 10:47:42 +00:00
2019-12-03 09:29:50 -08:00
2019-11-12 11:43:29 -05:00
2019-12-05 11:43:31 -08:00
2019-11-27 10:17:28 -08:00
2019-11-18 10:05:38 +01:00
2019-11-11 20:42:55 +02:00
2019-10-31 16:54:00 +05:30
2019-12-06 08:26:50 -08:00
2019-11-13 11:33:53 +01:00
2019-11-07 13:10:08 +00:00
2019-11-26 16:02:40 -08:00
2019-12-05 11:43:31 -08:00
2019-11-09 16:46:56 +05:30
2019-12-07 16:56:00 -08:00
2019-11-16 14:45:31 +01:00
2019-12-04 13:32:45 +10:00
2019-11-14 12:31:00 +08:00
2019-11-23 09:56:02 -08:00
2019-12-04 19:44:14 -08:00
2019-12-04 19:44:12 -08:00
2019-11-21 09:06:47 -07:00
2019-11-18 08:40:41 -07:00
2019-11-13 12:50:38 -07:00
2019-12-03 08:51:25 -07:00
2019-11-15 23:44:48 +01:00
2019-11-24 17:04:11 -08:00
2019-11-24 17:12:11 -08:00
2019-11-14 13:15:11 -05:00
2019-11-15 23:45:24 +01:00
2019-12-04 19:44:12 -08:00
2019-12-03 07:36:38 -07:00
2019-11-12 08:18:04 -08:00
2019-11-12 08:18:04 -08:00
2019-11-11 13:59:35 +01:00
2019-12-01 14:00:59 -08:00
2019-11-04 21:57:51 +01:00
2019-11-07 07:00:26 +01:00
2019-11-26 10:26:26 +01:00
2019-11-26 09:43:34 -08:00
2019-11-29 11:48:39 +01:00
2019-11-17 09:02:49 +08:00
2019-11-15 13:49:04 -05:00
2019-11-21 14:28:32 +01:00
2019-11-25 11:53:26 -08:00
2019-11-28 11:16:43 -08:00
2019-11-21 18:14:35 +01:00
2019-11-28 11:16:43 -08:00
2019-11-20 20:31:38 +01:00
2019-12-11 16:03:20 +05:30
2019-11-11 16:07:13 +01:00
2019-12-03 11:20:37 +01:00
2019-11-10 12:40:14 +01:00
2019-11-26 19:25:25 -08:00
2019-11-07 07:02:40 +01:00
2019-12-05 12:27:16 -08:00
2019-11-12 08:18:04 -08:00
2019-12-02 14:46:22 -08:00
2019-12-01 09:34:03 -08:00
2019-12-02 14:46:22 -08:00
2019-11-06 12:34:36 -08:00
2019-11-27 11:42:01 -08:00
2019-11-20 09:40:10 +01:00
2019-11-27 11:06:20 -08:00
2019-12-04 19:44:13 -08:00
2019-11-14 07:43:53 -07:00
2019-12-01 12:59:06 -08:00
2019-11-23 19:56:45 -04:00
2019-10-29 15:04:34 +01:00
2019-11-06 23:18:31 +01:00
2019-11-06 13:02:17 +01:00
2019-12-01 12:59:08 -08:00
2019-11-21 20:10:44 -05:00
2019-11-28 17:15:21 +01:00
2019-11-05 14:03:11 -08:00
2019-11-05 14:03:11 -08:00
2019-11-08 08:46:49 -08:00
2019-11-12 12:25:49 +11:00
2019-11-11 16:10:54 +01:00
2019-12-03 12:20:25 -08:00
2019-11-04 19:59:30 +00:00
2019-11-11 08:40:18 +00:00
2019-11-12 17:11:25 +01:00
2019-11-07 15:44:14 +01:00
2019-11-11 09:02:56 +01:00
2019-11-16 10:20:02 +00:00
2019-11-16 10:18:52 +00:00
2019-11-30 10:53:02 -08:00
2019-12-01 12:59:05 -08:00
2019-12-04 19:44:14 -08:00
2019-11-21 07:33:24 +01:00
2019-12-04 19:44:12 -08:00
2019-11-12 08:18:04 -08:00
2019-11-21 12:03:40 +01:00
2019-11-03 17:38:36 +01:00
2019-11-03 17:38:55 +01:00
2019-11-01 08:50:51 -06:00
2019-11-26 13:35:25 -07:00
2019-11-19 09:52:12 -08:00
2019-11-14 11:36:53 +08:00
2019-11-01 13:08:19 +01:00
2019-11-05 08:45:46 +08:00
2019-12-01 12:59:08 -08:00
2019-12-01 12:59:07 -08:00
2019-12-01 12:59:10 -08:00
2019-11-15 18:34:00 -08:00
2019-11-07 15:45:00 +01:00
2019-12-06 10:28:09 -08:00
2019-11-06 08:28:58 -08:00
2019-12-04 19:44:15 -08:00
2019-11-23 19:56:44 -04:00
2019-12-01 12:59:10 -08:00
2019-11-14 11:36:53 +08:00
2019-12-01 12:59:05 -08:00
2019-11-07 15:11:48 +01:00
2019-11-15 13:49:04 -05:00
2019-11-14 19:06:47 -08:00
2019-12-07 11:55:11 -08:00
2019-11-06 08:55:24 -05:00
2019-11-06 08:55:23 -05:00
2019-11-06 08:55:23 -05:00
2019-12-04 19:44:12 -08:00
2019-11-04 10:56:40 -07:00
2019-11-22 02:21:08 +09:00
2019-11-27 10:53:50 -08:00
2019-11-04 11:21:25 -08:00
2019-11-21 07:49:29 -06:00
2019-11-06 08:28:58 -08:00
2019-12-01 12:59:04 -08:00
2019-11-06 13:02:43 +01:00
2019-11-13 19:09:47 +08:00
2019-11-20 16:30:10 +00:00
2019-12-03 13:58:22 -08:00
2019-11-25 14:28:04 -08:00
2019-11-16 20:02:47 -08:00
2019-11-26 15:04:47 -08:00
2019-11-25 10:47:00 -08:00
2019-11-23 16:13:39 -08:00
2019-11-15 23:49:22 +01:00
2019-11-15 23:49:22 +01:00
2019-12-07 13:21:01 -08:00
2019-11-05 18:33:13 +01:00
2019-11-13 11:41:50 +01:00
2019-11-11 10:27:15 +05:30
2019-11-29 12:04:50 +01:00
2019-10-29 14:45:54 -05:00
2019-11-13 11:41:50 +01:00
2019-12-04 19:44:11 -08:00
2019-11-05 23:18:10 +01:00
2019-12-06 10:28:09 -08:00
2019-11-11 11:06:27 +01:00
2019-11-06 10:52:10 +01:00
2019-11-01 22:26:34 -04:00
2019-12-04 19:44:13 -08:00
2019-10-30 08:32:07 -07:00
2019-11-26 16:02:40 -08:00
2019-11-25 09:15:32 +01:00
2019-12-05 11:43:31 -08:00
2019-12-05 11:43:31 -08:00
2019-11-14 13:07:48 +08:00
2019-11-13 12:50:40 -07:00
2019-12-04 19:44:14 -08:00
2019-11-30 14:35:43 -08:00
2019-11-04 07:11:31 -07:00
2019-11-14 13:15:12 -05:00
2019-11-20 22:29:40 -08:00
2019-12-04 17:11:25 -08:00
2019-11-28 22:40:29 -08:00
2019-12-01 06:29:17 -08:00
2019-12-03 07:04:30 -07:00
2019-11-14 13:15:11 -05:00
2019-11-13 12:15:34 -08:00
2019-11-04 11:21:25 -08:00
2019-12-01 06:29:18 -08:00
2019-12-01 12:59:07 -08:00
2019-11-04 11:21:25 -08:00
2019-11-15 14:38:30 +01:00
2019-12-04 19:44:11 -08:00
2019-11-13 00:33:21 +11:00
2019-11-07 07:00:26 +01:00
2019-12-04 19:44:14 -08:00
2019-11-26 15:42:43 -08:00
2019-11-15 14:38:29 +01:00
2019-12-06 21:05:14 -08:00
2019-11-12 21:45:37 +02:00
2019-11-22 19:41:08 -05:00
2019-11-14 13:15:12 -05:00
2019-11-22 19:41:08 -05:00
2019-12-01 14:00:59 -08:00
2019-11-07 20:03:08 -08:00
2019-11-02 12:39:12 -07:00
2019-10-31 15:12:34 +00:00
2019-11-14 18:12:18 -08:00
2019-12-01 12:59:05 -08:00
2019-12-04 19:44:11 -08:00
2019-11-14 18:12:18 -08:00
2019-11-14 12:20:02 +08:00
2019-10-31 15:12:23 +00:00