From: Daniel Vetter Date: Thu, 9 Apr 2015 14:44:15 +0000 (+0200) Subject: drm/i915: Fix locking in DRRS flush/invalidate hooks X-Git-Tag: omap-for-v4.1/fixes-rc1~82^2~2^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9da7d69357389ea63893434fe3b17b9fbc2c2d2d;p=pandora-kernel.git drm/i915: Fix locking in DRRS flush/invalidate hooks We must acquire the mutex before we can check drrs.dp, otherwise someone might sneak in with a modeset, clear the pointer after we've checked it and then the code will Oops. This issue has been introduced in commit a93fad0f7fb8a3ff12e8814b630648f6d187954c Author: Vandana Kannan Date: Sat Jan 10 02:25:59 2015 +0530 drm/i915: DRRS calls based on frontbuffer v2: Don't blow up on uninitialized mutex and work item by checking whether DRRS is support or not first. Also unconditionally initialize the mutex/work item to avoid future trouble. Cc: Chris Wilson Cc: Ville Syrjälä Cc: Ramalingam C Cc: Rodrigo Vivi Cc: Vandana Kannan Cc: stable@vger.kernel.org (4.0+ only) Reviewed-by: Chris Wilson Tested-by: Chris Wilson Signed-off-by: Daniel Vetter Signed-off-by: Jani Nikula --- Reading git-diff-tree failed