From fd5989b3f9090a983a69d59d3edcd2f25ce76d31 Mon Sep 17 00:00:00 2001 From: Zhen Chen Date: Wed, 25 Nov 2020 17:01:54 +0800 Subject: [PATCH] MALI: bifrost: fix bug "Kbase can do an out of bound access due to invalid jobslot parameter" This patch is from ARM via mail "Fwd: 00209996 - [Rockchip][IMPORTANT] Cat A(rare)- Security bug in Mali DDK (16-Nov, 2020) Edit Subject" Signed-off-by: Zhen Chen Change-Id: Ife807e5e850274222db8aea0e4cac588e02a8e53 --- drivers/gpu/arm/bifrost/mali_kbase_jd.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/gpu/arm/bifrost/mali_kbase_jd.c b/drivers/gpu/arm/bifrost/mali_kbase_jd.c index fb187208ffe5..d0674d1bd8f4 100644 --- a/drivers/gpu/arm/bifrost/mali_kbase_jd.c +++ b/drivers/gpu/arm/bifrost/mali_kbase_jd.c @@ -1053,21 +1053,6 @@ static bool jd_submit_atom(struct kbase_context *const kctx, return jd_done_nolock(katom, NULL); } - - if (katom->core_req & BASE_JD_REQ_SOFT_JOB) { - /* This softjob has failed due to a previous - * dependency, however we should still run the - * prepare & finish functions - */ - if (kbase_prepare_soft_job(katom) != 0) { - katom->event_code = - BASE_JD_EVENT_JOB_INVALID; - return jd_done_nolock(katom, NULL); - } - } - - katom->will_fail_event_code = katom->event_code; - return false; } /* These must occur after the above loop to ensure that an atom