]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: add a NULL pointer check to avoid kernel panic
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Fri, 17 Feb 2017 11:29:52 +0000 (19:29 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 23 Feb 2017 09:32:13 +0000 (17:32 +0800)
commitba88c8b8435df3e1ed49b45022c5d70c55656964
treed8596485a231f43d6b9b2389dbe2abaf53f56923
parentff9c36967e8e737d036b6cd596e09f9f8046f9fb
drm/i915/gvt: add a NULL pointer check to avoid kernel panic

Due to the request replay, context switch interrupt may come after
gvt free the workload thus can cause a kernel NULL pointer kernel
panic. This patch will add a simple check to avoid this for a short
term.

From long term, gvt workload lifecycle doesn't match with i915 request
and need to find a proper way to manage this.

v4: simplify the NULL pointer check.
v5: add unlikely to optimize.

Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c