]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/gpu/drm/ast: Fix infinite loop if read fails
authorRussell Currey <ruscur@russell.cc>
Thu, 15 Dec 2016 05:12:41 +0000 (16:12 +1100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 18 Dec 2016 13:39:50 +0000 (14:39 +0100)
commit03648fb2f17ee399fae189abee2d73f3ddc8f944
tree98d46be4e77202f57ab7f36e4b245d484fa11025
parentffb3fc6239239bd9f73c10d4cc29352241bf01bd
drivers/gpu/drm/ast: Fix infinite loop if read fails

ast_get_dram_info() configures a window in order to access BMC memory.
A BMC register can be configured to disallow this, and if so, causes
an infinite loop in the ast driver which renders the system unusable.

Fix this by erroring out if an error is detected.  On powerpc systems with
EEH, this leads to the device being fenced and the system continuing to
operate.

Cc: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161215051241.20815-1-ruscur@russell.cc
drivers/gpu/drm/ast/ast_main.c