Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b470eac1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Sanitize command batch flags passed in by users"

parents 079b12e6 493995a4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1961,7 +1961,12 @@ static struct kgsl_cmdbatch *kgsl_cmdbatch_create(struct kgsl_device *device,

	cmdbatch->device = device;
	cmdbatch->context = context;
	cmdbatch->flags = flags & ~KGSL_CMDBATCH_SUBMIT_IB_LIST;
	/* sanitize our flags for cmdbatches */
	cmdbatch->flags = flags & (KGSL_CMDBATCH_CTX_SWITCH
				| KGSL_CMDBATCH_END_OF_FRAME
				| KGSL_CMDBATCH_SYNC
				| KGSL_CMDBATCH_PWR_CONSTRAINT
				| KGSL_CMDBATCH_MEMLIST);

	/* Add a timer to help debug sync deadlocks */
	setup_timer(&cmdbatch->timer, _kgsl_cmdbatch_timer,