Messages in this thread | | | Subject | Re: [PATCH] drm/i915/gvt/scheduler: fix potential NULL pointer dereference | From | "Gustavo A. R. Silva" <> | Date | Mon, 19 Mar 2018 15:50:12 -0500 |
| |
Hi Chris,
On 03/19/2018 03:38 PM, Chris Wilson wrote: > Quoting Gustavo A. R. Silva (2018-03-19 19:30:53) >> _workload_ is being dereferenced before it is null checked, hence >> there is a potential null pointer dereference. >> >> Fix this by moving the pointer dereference after _workload_ has >> been null checked. > > The checks are misleading and not required.
All of them?
if (!workload || !reg_state || workload->ring_id != RCS) return;
or just the null check on workload ?
Thanks for the feedback. -- Gustavo
| |