Andy Shevchenko
b28de385b7
dmaengine: dmatest: Check list for emptiness before access its last entry
...
After writing a garbage to the channel we get an Oops in dmatest_chan_set()
due to access to last entry in the empty list.
[ 212.670672] BUG: unable to handle page fault for address: fffffff000000020
[ 212.677562] #PF: supervisor read access in kernel mode
[ 212.682702] #PF: error_code(0x0000) - not-present page
...
[ 212.710074] RIP: 0010:dmatest_chan_set+0x149/0x2d0 [dmatest]
[ 212.715739] Code: e8 cc f9 ff ff 48 8b 1d 0d 55 00 00 48 83 7b 10 00 0f 84 63 01 00 00 48 c7 c7 d0 65 4d c0 e8 ee 4a f5 e1 48 89 c6 48 8b 43 10 <48> 8b 40 20 48 8b 78 58 48 85 ff 0f 84 f5 00 00 00 e8 b1 41 f5 e1
Fix this by checking list for emptiness before accessing its last entry.
Fixes: d53513d5dc28 ("dmaengine: dmatest: Add support for multi channel testing")
Cc: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200922115847.30100-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-09-22 20:18:41 +05:30
..
2019-06-19 17:09:55 +02:00
2020-08-17 11:58:31 +05:30
2019-12-26 10:04:18 +05:30
2020-09-18 12:42:33 +05:30
2020-03-06 19:04:55 +05:30
2019-07-17 09:55:43 -07:00
2020-09-11 17:45:36 +05:30
2020-09-18 12:31:37 +05:30
2019-06-19 17:09:55 +02:00
2020-09-18 12:32:37 +05:30
2020-03-11 15:10:45 +05:30
2020-09-11 17:42:13 +05:30
2020-09-18 12:30:53 +05:30
2020-09-11 17:48:28 +05:30
2020-09-18 13:06:26 +05:30
2020-09-03 12:38:59 +05:30
2020-08-17 10:21:37 +05:30
2020-07-15 17:50:46 +05:30
2020-08-23 17:36:59 -05:00
2020-05-13 20:25:16 +05:30
2020-08-19 09:58:38 +05:30
2020-05-13 20:25:41 +05:30
2020-09-11 17:42:12 +05:30
2020-02-13 20:15:35 +05:30
2019-05-30 11:29:22 -07:00
2020-02-24 21:59:45 +05:30
2019-05-30 11:29:22 -07:00
2020-09-11 17:42:12 +05:30
2020-08-25 16:45:17 +05:30
2020-09-03 12:22:35 +05:30
2020-03-11 14:56:14 +05:30
2020-09-22 20:18:41 +05:30
2020-07-15 17:50:46 +05:30
2020-07-06 14:49:22 +05:30
2020-07-06 10:24:49 +05:30
2020-06-24 13:05:01 +05:30
2020-07-17 11:50:03 +05:30
2020-08-23 17:36:59 -05:00
2020-08-29 13:50:56 -07:00
2020-06-24 11:26:23 +05:30
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:15 +02:00
2020-09-11 17:45:36 +05:30
2020-09-11 17:42:13 +05:30
2020-09-18 12:55:16 +05:30
2020-08-23 17:36:59 -05:00
2019-12-23 13:21:14 +05:30
2020-08-07 11:13:37 +05:30
2019-06-19 17:09:55 +02:00
2020-03-02 14:54:34 +05:30
2020-06-24 13:06:15 +05:30
2019-07-17 09:55:43 -07:00
2019-06-05 17:36:38 +02:00
2020-06-15 23:08:30 -05:00
2020-06-15 23:08:30 -05:00
2020-07-15 17:50:46 +05:30
2020-06-16 21:59:01 +05:30
2020-06-15 23:08:30 -05:00
2019-05-21 11:28:40 +02:00
2020-07-15 17:50:47 +05:30
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2020-09-11 17:42:13 +05:30
2020-08-23 17:36:59 -05:00
2020-08-17 11:14:28 +05:30
2020-07-27 14:43:08 +05:30
2020-08-17 10:23:55 +05:30
2020-09-11 17:45:36 +05:30
2020-01-15 19:40:51 +05:30
2019-07-17 09:55:43 -07:00
2020-01-23 17:03:25 +05:30
2020-02-19 17:48:40 +05:30
2019-05-21 11:28:40 +02:00
2020-03-23 11:38:24 +05:30
2020-06-30 09:34:23 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2020-09-11 17:42:13 +05:30
2020-09-03 12:38:59 +05:30
2020-09-03 12:38:59 +05:30
2020-09-03 12:38:59 +05:30
2020-07-15 17:50:47 +05:30
2019-07-31 20:50:53 +05:30
2020-06-15 23:08:32 -05:00
2020-06-24 15:11:39 +05:30
2020-06-15 23:08:30 -05:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-02-13 20:15:57 +05:30
2020-06-30 09:34:23 -04:00
2020-01-27 10:55:50 -08:00
2019-12-26 10:04:18 +05:30
2020-07-15 17:50:47 +05:30
2020-09-18 12:30:50 +05:30