Exploit databaseDownload repository ZIP
GH-b6f78b211ff4ea5e7b3ebffe1f088758
abrarkhan/linux-4.19.72_cve-2020-24490
Sources for CVE-2020-24490
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files208
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- gvt/
- selftests/
- Kconfig
- Kconfig.debug
- Makefile
- dvo.h
- dvo_ch7017.c
- dvo_ch7xxx.c
- dvo_ivch.c
- dvo_ns2501.c
- dvo_sil164.c
- dvo_tfp410.c
- i915_cmd_parser.c
- i915_debugfs.c
- i915_drv.c
- i915_drv.h
- i915_gem.c
- i915_gem.h
- i915_gem_batch_pool.c
- i915_gem_batch_pool.h
- i915_gem_clflush.c
- i915_gem_clflush.h
- i915_gem_context.c
- i915_gem_context.h
- i915_gem_dmabuf.c
- i915_gem_evict.c
- i915_gem_execbuffer.c
- i915_gem_fence_reg.c
- i915_gem_fence_reg.h
- i915_gem_gtt.c
- i915_gem_gtt.h
- i915_gem_internal.c
- i915_gem_object.c
- i915_gem_object.h
- i915_gem_render_state.c
- i915_gem_render_state.h
- i915_gem_shrinker.c
- i915_gem_stolen.c
- i915_gem_tiling.c
- i915_gem_userptr.c
- i915_gemfs.c
- i915_gemfs.h
- i915_gpu_error.c
- i915_gpu_error.h
- i915_ioc32.c
- i915_irq.c
- i915_memcpy.c
- i915_mm.c
- i915_oa_bdw.c
- i915_oa_bdw.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/gpu/drm/i915/i915_timeline.c
C · 2,701 bytes/*
* SPDX-License-Identifier: MIT
*
* Copyright © 2016-2018 Intel Corporation
*/
#include "i915_drv.h"
#include "i915_timeline.h"
#include "i915_syncmap.h"
void i915_timeline_init(struct drm_i915_private *i915,
struct i915_timeline *timeline,
const char *name)
{
lockdep_assert_held(&i915->drm.struct_mutex);
/*
* Ideally we want a set of engines on a single leaf as we expect
* to mostly be tracking synchronisation between engines. It is not
* a huge issue if this is not the case, but we may want to mitigate
* any page crossing penalties if they become an issue.
*/
BUILD_BUG_ON(KSYNCMAP < I915_NUM_ENGINES);
timeline->name = name;
list_add(&timeline->link, &i915->gt.timelines);
/* Called during early_init before we know how many engines there are */
timeline->fence_context = dma_fence_context_alloc(1);
spin_lock_init(&timeline->lock);
init_request_active(&timeline->last_request, NULL);
INIT_LIST_HEAD(&timeline->requests);
i915_syncmap_init(&timeline->sync);
}
/**
* i915_timelines_park - called when the driver idles
* @i915: the drm_i915_private device
*
* When the driver is completely idle, we know that all of our sync points
* have been signaled and our tracking is then entirely redundant. Any request
* to wait upon an older sync point will be completed instantly as we know
* the fence is signaled and therefore we will not even look them up in the
* sync point map.
*/
void i915_timelines_park(struct drm_i915_private *i915)
{
struct i915_timeline *timeline;
lockdep_assert_held(&i915->drm.struct_mutex);
list_for_each_entry(timeline, &i915->gt.timelines, link) {
/*
* All known fences are completed so we can scrap
* the current sync point tracking and start afresh,
* any attempt to wait upon a previous sync point
* will be skipped as the fence was signaled.
*/
i915_syncmap_free(&timeline->sync);
}
}
void i915_timeline_fini(struct i915_timeline *timeline)
{
GEM_BUG_ON(!list_empty(&timeline->requests));
i915_syncmap_free(&timeline->sync);
list_del(&timeline->link);
}
struct i915_timeline *
i915_timeline_create(struct drm_i915_private *i915, const char *name)
{
struct i915_timeline *timeline;
timeline = kzalloc(sizeof(*timeline), GFP_KERNEL);
if (!timeline)
return ERR_PTR(-ENOMEM);
i915_timeline_init(i915, timeline, name);
kref_init(&timeline->kref);
return timeline;
}
void __i915_timeline_free(struct kref *kref)
{
struct i915_timeline *timeline =
container_of(kref, typeof(*timeline), kref);
i915_timeline_fini(timeline);
kfree(timeline);
}
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/mock_timeline.c"
#include "selftests/i915_timeline.c"
#endif