Wang Xiayang
1a2c29bce0
drm/amdgpu: fix a potential information leaking bug
...
Coccinelle reports a path that the array "data" is never initialized.
The path skips the checks in the conditional branches when either
of callback functions, read_wave_vgprs and read_wave_sgprs, is not
registered. Later, the uninitialized "data" array is read
in the while-loop below and passed to put_user().
Fix the path by allocating the array with kcalloc().
The patch is simplier than adding a fall-back branch that explicitly
calls memset(data, 0, ...). Also it does not need the multiplication
1024*sizeof(*data) as the size parameter for memset() though there is
no risk of integer overflow.
Signed-off-by: Wang Xiayang <xywang.sjtu@sjtu.edu.cn >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-07-30 23:48:33 -05:00
..
2019-06-10 23:00:01 +02:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-07-18 14:18:04 -05:00
2019-06-14 11:44:24 +02:00
2019-06-14 11:44:24 +02:00
2019-07-18 14:18:04 -05:00
2019-07-18 14:18:07 -05:00
2019-06-21 18:59:23 -05:00
2019-07-30 23:17:35 -05:00
2019-07-18 14:18:04 -05:00
2019-07-18 14:18:04 -05:00
2019-06-10 23:02:48 +02:00
2019-06-25 08:42:25 -05:00
2019-05-30 11:29:21 -07:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-14 11:44:24 +02:00
2019-05-24 12:21:02 -05:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-07-30 23:48:33 -05:00
2019-06-21 18:57:40 -05:00
2019-07-18 14:18:07 -05:00
2019-07-30 23:48:33 -05:00
2019-06-21 18:58:21 -05:00
2019-07-30 23:24:44 -05:00
2019-07-11 14:37:24 -05:00
2019-06-21 18:58:21 -05:00
2019-07-30 23:48:32 -05:00
2019-07-30 23:48:32 -05:00
2019-07-30 23:48:32 -05:00
2019-07-18 14:18:05 -05:00
2019-06-25 08:42:25 -05:00
2019-06-21 18:59:25 -05:00
2019-07-30 23:24:44 -05:00
2019-06-10 23:02:48 +02:00
2019-07-30 23:48:32 -05:00
2019-06-25 08:42:25 -05:00
2019-06-10 23:02:48 +02:00
2019-07-01 14:53:30 -05:00
2019-07-30 23:48:32 -05:00
2019-07-18 14:18:00 -05:00
2019-07-16 13:08:38 -05:00
2019-06-10 22:59:32 +02:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-25 08:42:25 -05:00
2019-07-18 14:18:01 -05:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-14 11:44:24 +02:00
2019-06-21 18:57:40 -05:00
2019-07-18 14:18:06 -05:00
2019-06-21 18:59:28 -05:00
2019-07-08 13:55:00 -05:00
2019-07-08 13:55:00 -05:00
2019-05-24 12:25:56 -05:00
2019-07-30 23:22:48 -05:00
2019-07-30 23:22:48 -05:00
2019-06-10 23:02:48 +02:00
2019-07-30 23:48:32 -05:00
2019-06-13 13:59:48 -05:00
2019-06-20 11:36:22 -05:00
2019-06-20 11:36:22 -05:00
2019-07-18 14:18:01 -05:00
2019-07-12 08:00:10 -05:00
2019-07-18 14:18:07 -05:00
2019-06-19 12:07:29 +02:00
2019-06-25 08:42:25 -05:00
2019-07-18 14:18:05 -05:00
2019-06-20 21:46:49 -05:00
2019-06-10 23:02:48 +02:00
2019-06-10 22:59:53 +02:00
2019-06-10 23:00:08 +02:00
2019-06-25 08:42:25 -05:00
2019-07-18 14:18:02 -05:00
2019-06-21 18:59:34 -05:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:02:48 +02:00
2019-06-10 23:00:08 +02:00
2019-07-17 13:34:30 -05:00
2019-07-08 13:55:00 -05:00
2019-07-18 14:18:02 -05:00
2019-07-18 14:18:05 -05:00
2019-06-10 23:02:48 +02:00
2019-06-19 12:07:29 +02:00
2019-07-18 14:18:06 -05:00
2019-07-30 23:48:32 -05:00
2019-07-16 13:09:09 -05:00
2019-06-21 18:57:40 -05:00
2019-07-30 23:19:35 -05:00
2019-07-30 23:19:35 -05:00
2019-06-25 08:42:25 -05:00
2019-07-30 23:22:34 -05:00
2019-07-30 23:24:44 -05:00
2019-07-18 14:18:02 -05:00
2019-07-18 14:18:00 -05:00
2019-06-20 21:35:29 -05:00
2019-06-10 23:00:01 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-07-30 23:24:06 -05:00
2019-06-20 21:16:37 -05:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-07-18 14:18:02 -05:00
2019-06-22 09:34:14 -05:00
2019-07-30 23:22:26 -05:00
2019-06-20 11:35:45 -05:00
2019-07-16 13:08:38 -05:00
2019-07-30 23:48:32 -05:00
2019-07-30 23:48:32 -05:00
2019-07-30 23:48:32 -05:00
2019-07-30 23:48:32 -05:00
2019-06-21 18:59:23 -05:00
2019-07-18 14:18:01 -05:00
2019-07-18 14:18:01 -05:00
2019-06-20 21:35:29 -05:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-14 11:44:24 +02:00
2019-07-18 14:18:06 -05:00
2019-07-18 14:18:04 -05:00
2019-07-18 14:18:01 -05:00
2019-06-20 21:35:29 -05:00
2019-06-10 23:04:34 +02:00
2019-05-31 10:04:39 +10:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-07-18 14:18:04 -05:00
2019-06-25 08:42:25 -05:00
2019-07-08 13:56:02 -05:00
2019-07-18 14:18:01 -05:00
2019-07-18 14:18:01 -05:00
2019-06-20 21:35:29 -05:00
2019-07-18 14:18:06 -05:00
2019-07-18 14:18:02 -05:00
2019-06-11 12:39:51 -05:00
2019-06-20 21:35:30 -05:00
2019-06-20 21:35:30 -05:00
2019-06-21 18:59:33 -05:00
2019-06-20 21:16:38 -05:00
2019-07-18 14:17:58 -05:00
2019-07-18 14:18:05 -05:00
2019-06-20 21:18:36 -05:00
2019-07-18 14:18:05 -05:00
2019-07-30 23:24:17 -05:00
2019-07-18 14:17:58 -05:00
2019-06-20 21:16:38 -05:00
2019-06-21 18:59:32 -05:00
2019-07-12 08:00:10 -05:00
2019-06-10 22:59:53 +02:00
2019-07-18 14:18:00 -05:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-07-22 14:57:31 -05:00
2019-07-18 14:18:01 -05:00
2019-06-21 18:58:21 -05:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-06-10 23:04:34 +02:00
2019-07-30 23:23:56 -05:00
2019-05-24 12:20:52 -05:00
2019-07-30 23:24:13 -05:00
2019-07-18 14:18:02 -05:00
2019-06-11 11:51:28 -05:00
2019-06-10 23:04:34 +02:00
2019-06-14 11:44:24 +02:00
2019-06-14 11:44:24 +02:00
2019-06-19 12:07:29 +02:00
2019-07-18 14:18:01 -05:00
2019-06-14 11:44:24 +02:00
2019-06-14 11:44:24 +02:00
2019-07-18 14:18:01 -05:00
2019-07-18 14:18:05 -05:00
2019-07-30 23:48:33 -05:00
2019-07-18 14:18:04 -05:00
2019-07-30 23:19:28 -05:00
2019-07-18 14:18:05 -05:00
2019-07-18 14:18:03 -05:00
2019-07-18 14:18:05 -05:00
2019-07-30 23:24:10 -05:00