Akhil P Oommen
3cbdc8d8b7
drm/msm: Fix a null pointer access in msm_gem_shrinker_count()
Adding an msm_gem_object object to the inactive_list before completing
its initialization is a bad idea because shrinker may pick it up from the
inactive_list. Fix this by making sure that the initialization is complete
before moving the msm_obj object to the inactive list.
This patch fixes the below error:
[10027.553044] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000068
[10027.573305] Mem abort info:
[10027.590160] ESR = 0x96000006
[10027.597905] EC = 0x25: DABT (current EL), IL = 32 bits
[10027.614430] SET = 0, FnV = 0
[10027.624427] EA = 0, S1PTW = 0
[10027.632722] Data abort info:
[10027.638039] ISV = 0, ISS = 0x00000006
[10027.647459] CM = 0, WnR = 0
[10027.654345] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001e3a6a000
[10027.672681] [0000000000000068] pgd=0000000198c31003, pud=0000000198c31003, pmd=0000000000000000
[10027.693900] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[10027.738261] CPU: 3 PID: 214 Comm: kswapd0 Tainted: G S 5.4.40 #1
[10027.745766] Hardware name: Qualcomm Technologies, Inc. SC7180 IDP (DT)
[10027.752472] pstate: 80c00009 (Nzcv daif +PAN +UAO)
[10027.757409] pc : mutex_is_locked+0x14/0x2c
[10027.761626] lr : msm_gem_shrinker_count+0x70/0xec
[10027.766454] sp : ffffffc011323ad0
[10027.769867] x29: ffffffc011323ad0 x28: ffffffe677e4b878
[10027.775324] x27: 0000000000000cc0 x26: 0000000000000000
[10027.780783] x25: ffffff817114a708 x24: 0000000000000008
[10027.786242] x23: ffffff8023ab7170 x22: 0000000000000001
[10027.791701] x21: ffffff817114a080 x20: 0000000000000119
[10027.797160] x19: 0000000000000068 x18: 00000000000003bc
[10027.802621] x17: 0000000004a34210 x16: 00000000000000c0
[10027.808083] x15: 0000000000000000 x14: 0000000000000000
[10027.813542] x13: ffffffe677e0a3c0 x12: 0000000000000000
[10027.819000] x11: 0000000000000000 x10: ffffff8174b94340
[10027.824461] x9 : 0000000000000000 x8 : 0000000000000000
[10027.829919] x7 : 00000000000001fc x6 : ffffffc011323c88
[10027.835373] x5 : 0000000000000001 x4 : ffffffc011323d80
[10027.840832] x3 : ffffffff0477b348 x2 : 0000000000000000
[10027.846290] x1 : ffffffc011323b68 x0 : 0000000000000068
[10027.851748] Call trace:
[10027.854264] mutex_is_locked+0x14/0x2c
[10027.858121] msm_gem_shrinker_count+0x70/0xec
[10027.862603] shrink_slab+0xc0/0x4b4
[10027.866187] shrink_node+0x4a8/0x818
[10027.869860] kswapd+0x624/0x890
[10027.873097] kthread+0x11c/0x12c
[10027.876424] ret_from_fork+0x10/0x18
[10027.880102] Code: f9000bf3 910003fd aa0003f3 d503201f (f9400268)
[10027.886362] ---[ end trace df5849a1a3543251 ]---
[10027.891518] Kernel panic - not syncing: Fatal exception
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
2020-07-31 06:46:15 -07:00
..
2020-07-29 09:43:06 +10:00
2020-06-10 09:02:03 +02:00
2020-07-02 20:25:51 +02:00
2020-06-24 15:45:51 +10:00
2020-07-24 08:48:05 +10:00
2020-07-20 09:16:23 +02:00
2020-07-02 20:25:51 +02:00
2020-06-25 11:59:43 +02:00
2020-07-13 17:57:17 +02:00
2020-07-23 15:28:10 +10:00
2020-07-24 08:48:05 +10:00
2020-06-10 09:02:52 +02:00
2020-05-27 14:31:42 +03:00
2020-07-24 08:48:05 +10:00
2020-06-23 19:53:27 +02:00
2020-07-20 09:34:24 +02:00
2020-07-24 08:48:05 +10:00
2020-07-23 15:21:45 +10:00
2020-07-19 13:03:15 +02:00
2020-07-13 13:47:41 +08:00
2020-07-24 08:48:05 +10:00
2020-07-24 09:41:57 +10:00
2020-07-24 08:48:05 +10:00
2020-07-14 09:14:06 +02:00
2020-07-31 06:46:15 -07:00
2020-07-20 10:59:10 +02:00
2020-07-29 10:06:38 +10:00
2020-07-02 20:25:51 +02:00
2020-07-24 08:48:05 +10:00
2020-06-19 11:00:02 +01:00
2020-06-30 00:32:59 +02:00
2020-07-29 09:43:06 +10:00
2020-04-03 17:11:41 +02:00
2020-07-29 09:43:06 +10:00
2020-07-24 08:48:05 +10:00
2020-06-23 19:57:06 +02:00
2020-06-29 12:16:26 +02:00
2020-06-23 15:57:30 +02:00
2020-06-10 09:05:18 +02:00
2020-06-10 09:05:45 +02:00
2020-07-08 11:47:01 +02:00
2020-07-24 08:48:05 +10:00
2020-07-24 09:38:55 +10:00
2020-07-16 22:13:52 +02:00
2020-07-14 10:32:33 +02:00
2020-06-24 09:17:34 +02:00
2020-07-29 10:06:38 +10:00
2020-06-10 09:06:11 +02:00
2020-06-10 10:17:21 +02:00
2020-05-19 22:31:35 +01:00
2020-07-16 22:12:50 +02:00
2020-07-07 10:51:58 +02:00
2020-07-08 22:00:21 +01:00
2020-07-14 10:47:16 +02:00
2020-07-12 18:09:13 -04:00
2020-07-29 10:01:23 +10:00
2020-05-19 22:31:36 +01:00
2020-07-18 02:59:16 +03:00
2020-06-29 09:39:04 +02:00
2020-06-23 19:53:27 +02:00
2020-07-02 20:25:51 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-06-15 14:49:50 +01:00
2020-05-14 02:10:52 +03:00
2020-02-26 13:31:41 +02:00
2020-06-23 19:53:27 +02:00
2020-07-02 15:26:00 +02:00
2020-05-27 14:31:42 +03:00
2020-05-26 13:31:01 +02:00
2020-07-02 15:26:00 +02:00
2020-03-16 09:23:55 +01:00
2020-07-02 15:26:00 +02:00
2020-03-18 17:53:28 +01:00
2020-07-02 15:26:00 +02:00
2020-06-25 15:47:14 -07:00
2020-04-03 17:11:41 +02:00
2020-07-09 21:20:33 +03:00
2020-07-02 15:26:00 +02:00
2020-04-28 15:05:19 +02:00
2020-07-20 09:34:24 +02:00
2020-06-19 09:20:21 +02:00
2020-04-21 08:15:03 +02:00
2020-07-24 08:48:05 +10:00
2020-07-02 15:26:00 +02:00
2020-05-26 13:33:08 +02:00
2020-06-19 13:33:40 +01:00
2020-07-02 15:26:00 +02:00
2020-07-20 09:34:24 +02:00
2020-05-19 22:31:31 +01:00
2020-06-16 19:11:51 +02:00
2020-05-19 22:31:31 +01:00
2020-07-21 16:03:28 +02:00
2020-06-10 09:06:30 +02:00
2020-05-05 14:01:53 -04:00
2020-07-16 18:16:31 -04:00
2020-07-02 15:26:00 +02:00
2020-06-24 15:45:51 +10:00
2020-05-29 12:58:11 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-05-18 16:27:54 +01:00
2020-07-20 09:34:24 +02:00
2020-07-10 20:21:45 +02:00
2020-06-23 15:46:40 +02:00
2020-07-02 15:26:00 +02:00
2020-05-05 10:51:56 +02:00
2020-07-20 11:47:28 +02:00
2020-07-01 10:49:25 +02:00
2020-06-23 12:32:06 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-07-02 15:26:00 +02:00
2020-06-30 13:31:27 +02:00
2020-06-02 10:59:11 -07:00
2020-03-06 09:24:29 +01:00
2020-07-02 15:26:00 +02:00
2020-06-03 10:24:23 +02:00
2020-07-16 18:16:31 -04:00
2020-07-21 11:08:35 -04:00
2020-06-24 15:45:51 +10:00
2020-05-20 20:03:45 +02:00
2020-07-18 02:59:16 +03:00
2020-07-23 15:31:38 +10:00