]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerLuis Henriques <luis.henriques@canonical.com>
Fri, 20 Jan 2017 11:24:10 +0000 (11:24 +0000)
commitb6c41f661d1af4e33515ac602cb92228d0f405d1
treea69167faa2e7488e1a1cb60e059d5b3688a2c043
parent529c8ec85a087655ca89bb463af8de777d683f4a
drivers/gpu/drm/ast: Fix infinite loop if read fails

BugLink: http://bugs.launchpad.net/bugs/1655041
commit 298360af3dab45659810fdc51aba0c9f4097e4f6 upstream.

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.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/gpu/drm/ast/ast_main.c