]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2017 07:21:52 +0000 (08:21 +0100)
commitdfc3c8a0fa1b0a2299fbb5cb01f73657c7213479
treea6fa48380103218c06d06c5c08452f5bd875fedb
parent0f95e4a58ecdd368299558e46500e2064e5e5f67
drivers/gpu/drm/ast: Fix infinite loop if read fails

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>
drivers/gpu/drm/ast/ast_main.c