android_kernel_oneplus_msm8998/drivers/gpu/msm
Rajesh Kemisetti a614a92c2a msm: kgsl: Fix race condition between drawobj and context destroy
drawobj_destroy_sync() tries to cancel all pending sync events
by taking local copy of pending list. In case of sync point timestamp
event, it goes ahead and accesses context's events list assuming that
event's context would be alive.

But at the same time, if the other context, which is of interest for
these sync point events, can be destroyed by cancelling all
events in its group.

This leads to use-after-free in drawobj_destroy_sync() path.

Fix is to give the responsibility of putting the context's ref count
to the thread which clears the pending mask.

Change-Id: I8d08ef6ddb38ca917f75088071c04727bced11d2
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2019-08-30 09:24:37 +02:00
..
a3xx_reg.h msm: kgsl: Purge unused #defines 2016-05-05 15:05:56 -07:00
a4xx_reg.h msm: kgsl: Change GPU clock gating sequence for A4XX and A5XX 2016-09-30 10:52:19 -07:00
a5xx_reg.h Merge "msm: kgsl: preserve ISENSE registers across GPU power collapse" 2016-11-17 10:08:36 -08:00
adreno-gpulist.h msm: kgsl: Add support for A509 GPU 2018-03-13 12:30:15 +05:30
adreno.c msm: kgsl: Don't halt dispatcher if device is not in SUSPEND state 2018-10-29 15:30:54 +05:30
adreno.h msm: kgsl: unload/reload zap shader 2018-07-27 11:35:17 -07:00
adreno_a3xx.c msm: kgsl: Set the abnormal power perf counter value to zero 2017-08-03 11:22:12 -07:00
adreno_a3xx.h msm: kgsl: Clean up adreno trace code 2016-05-05 15:05:56 -07:00
adreno_a3xx_snapshot.c msm: kgsl: Add and use KGSL_DEVICE macro 2016-03-23 21:18:41 -07:00
adreno_a4xx.c msm: kgsl: Set the abnormal power perf counter value to zero 2017-08-03 11:22:12 -07:00
adreno_a4xx.h msm: kgsl: Implement fast preemption for 5XX 2016-07-20 15:19:33 -06:00
adreno_a4xx_preempt.c msm: kgsl: Fix pt NULL pointer dereference 2016-11-14 03:01:06 -08:00
adreno_a4xx_snapshot.c msm: kgsl: Make VBIF register dump more generic 2016-08-03 10:34:05 -06:00
adreno_a5xx.c msm: kgsl: Replace scm call api with its atomic version 2018-09-03 17:01:30 +05:30
adreno_a5xx.h msm: kgsl: preserve ISENSE registers across GPU power collapse 2016-11-14 10:09:42 -08:00
adreno_a5xx_packets.h msm: kgsl: Submit a set of critical packets right after ME init 2016-03-23 21:21:32 -07:00
adreno_a5xx_preempt.c msm: kgsl: Fix leak when preemption init fails 2017-07-24 23:30:30 -07:00
adreno_a5xx_snapshot.c msm: kgsl: Don't dump GPMU registers on non GPMU devices 2018-05-23 15:54:00 +05:30
adreno_compat.c msm: kgsl: Map GPU QTimer through GPU IOMMU 2017-02-28 11:12:33 -07:00
adreno_compat.h
adreno_coresight.c msm: kgsl: Add trace ID support for graphics coresight 2016-12-07 08:57:09 -07:00
adreno_cp_parser.c msm: kgsl: Fix incomplete IB2 dump in the snapshot 2017-01-30 03:29:07 -08:00
adreno_cp_parser.h msm: kgsl: Fix incomplete IB2 dump in the snapshot 2017-01-30 03:29:07 -08:00
adreno_debugfs.c msm: kgsl: Protect the event->handle with spinlock 2017-08-03 00:08:03 -07:00
adreno_dispatch.c msm: kgsl: Fix XO shutdown issue 2018-03-14 07:46:40 -07:00
adreno_dispatch.h msm: kgsl: Fix XO shutdown issue 2018-03-14 07:46:40 -07:00
adreno_drawctxt.c msm: kgsl: Do not crash on context detach timeout failure 2017-09-13 11:41:46 +05:30
adreno_drawctxt.h msm: kgsl: Do not crash on context detach timeout failure 2017-09-13 11:41:46 +05:30
adreno_ioctl.c msm: kgsl: Implement fast preemption for 5XX 2016-07-20 15:19:33 -06:00
adreno_iommu.c msm: kgsl: Check MMU type for memory and pagetable operations 2016-12-01 23:25:18 -08:00
adreno_iommu.h msm: kgsl: Force all command level context switches to the GPU 2016-07-20 15:19:34 -06:00
adreno_perfcounter.c msm: kgsl: Check GPMU presence before accessing power counters 2017-01-27 08:44:35 +05:30
adreno_perfcounter.h
adreno_pm4types.h msm: kgsl: Purge unused #defines 2016-05-05 15:05:56 -07:00
adreno_profile.c msm: kgsl: Improve logs for pagefaults on global buffers 2016-08-25 15:35:22 -06:00
adreno_profile.h
adreno_ringbuffer.c Merge "msm: kgsl: Do not allocate scratch memory for A3xx" 2017-09-11 19:12:55 -07:00
adreno_ringbuffer.h msm: kgsl: Modify dispatcher to accept generic objects 2016-10-06 15:54:39 -07:00
adreno_snapshot.c msm: kgsl: Add missing check for snapshot IB dump 2019-08-30 09:21:10 +02:00
adreno_snapshot.h
adreno_sysfs.c msm: kgsl: Create sysfs entry to control GPU clock throttling. 2016-06-27 19:53:04 -07:00
adreno_trace.c
adreno_trace.h msm: kgsl: Add a trace event for the GPU clock 2017-08-02 11:13:31 -06:00
Kconfig msm: kgsl: Use CONFIG_QCOM_KGSL_IOMMU 2016-03-23 21:23:22 -07:00
kgsl.c msm: kgsl: Fix race condition while making page as dirty 2019-05-15 22:10:58 -07:00
kgsl.h msm: kgsl: Limit the maximum number of contexts 2018-03-05 01:17:09 -08:00
kgsl_cffdump.c msm: kgsl: Modify dispatcher to accept generic objects 2016-10-06 15:54:39 -07:00
kgsl_cffdump.h msm: kgsl: Modify dispatcher to accept generic objects 2016-10-06 15:54:39 -07:00
kgsl_compat.c msm: kgsl: Add Bind objects to dispatcher draw queue 2016-12-07 10:33:16 -08:00
kgsl_compat.h msm: kgsl: Rename cmdbatch to drawobj 2016-10-05 16:57:21 -07:00
kgsl_debugfs.c msm: kgsl: Use the bind lock when dumping entries 2017-11-14 22:36:49 -08:00
kgsl_debugfs.h msm: kgsl: Clean up device debugfs files on removal 2017-02-16 17:35:48 +05:30
kgsl_device.h msm: kgsl: Correctly limit max number of contexts per process 2019-03-06 23:32:09 -08:00
kgsl_drawobj.c msm: kgsl: Fix race condition between drawobj and context destroy 2019-08-30 09:24:37 +02:00
kgsl_drawobj.h msm: kgsl: Protect the event->handle with spinlock 2017-08-03 00:08:03 -07:00
kgsl_events.c msm: kgsl: convert some workqueues to use kthreads. 2017-06-21 22:56:18 -07:00
kgsl_ioctl.c msm: kgsl: Add Bind objects to dispatcher draw queue 2016-12-07 10:33:16 -08:00
kgsl_iommu.c msm: kgsl: Move global memory region to 0x100000000 2018-01-23 20:49:13 +05:30
kgsl_iommu.h msm: kgsl: Update global memory base to 0XFC000000 for 64bit kernel 2018-01-30 10:52:46 +05:30
kgsl_log.h msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area() 2017-09-07 21:04:46 +05:30
kgsl_mmu.c msm: kgsl: Map GPU QTimer through GPU IOMMU 2017-02-28 11:12:33 -07:00
kgsl_mmu.h msm: kgsl: Map GPU QTimer through GPU IOMMU 2017-02-28 11:12:33 -07:00
kgsl_pool.c msm: kgsl: Return supported page size based on available memory pools 2017-09-01 06:00:48 -07:00
kgsl_pool.h msm: kgsl: Return supported page size based on available memory pools 2017-09-01 06:00:48 -07:00
kgsl_pwrctrl.c msm: kgsl: Correct the state transitions in suspend function 2018-10-17 11:57:53 +05:30
kgsl_pwrctrl.h msm: kgsl: Add disable-wake-on-touch devicetree property 2017-08-08 18:57:26 +05:30
kgsl_pwrscale.c msm: kgsl: Update total time at right place for accurate GPU busy 2017-07-21 10:49:25 +05:30
kgsl_pwrscale.h msm: kgsl: Do a midframe sampling of power stats if enabled 2016-12-22 20:55:12 +05:30
kgsl_sharedmem.c msm: kgsl: create sysfs entries to expose memory usage 2018-10-16 13:51:39 +05:30
kgsl_sharedmem.h msm: kgsl: Return supported page size based on available memory pools 2017-09-01 06:00:48 -07:00
kgsl_snapshot.c msm: kgsl: Use init_utsname() instead of ustname() for kernel build info. 2017-02-24 12:06:16 +05:30
kgsl_snapshot.h msm: kgsl: Fix incomplete IB2 dump in the snapshot 2017-01-30 03:29:07 -08:00
kgsl_sync.c msm: kgsl: Correctly update fence_name for larger timestamp 2017-08-09 02:17:09 -07:00
kgsl_sync.h
kgsl_trace.c
kgsl_trace.h msm: kgsl: Modify dispatcher to accept generic objects 2016-10-06 15:54:39 -07:00
Makefile msm: kgsl: Rename cmdbatch to drawobj 2016-10-05 16:57:21 -07:00