]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/radeon: Make r100_cp_ring_info() and radeon_ring_gfx() safe (v2)
authorAlex Ivanov <gnidorah@p0n4ik.tk>
Fri, 20 Sep 2013 13:36:06 +0000 (17:36 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2013 14:17:57 +0000 (07:17 -0700)
commitcb51bb7107aa040f9779be931e3bd6a7b50e0f69
tree8a0062df5077c4a26a8634e6e080058eb58020a4
parent986f359ca255d3541e102251bf82ec51d9567f68
drm/radeon: Make r100_cp_ring_info() and radeon_ring_gfx() safe (v2)

commit 0eb3448aa6b31fbf24c31756aba7940cac5ad6b8 upstream.

Prevent NULL pointer dereference in case when radeon_ring_fini() did it's job.

Reading of r100_cp_ring_info and radeon_ring_gfx debugfs entries will lead to a KP if ring buffer was deallocated, e.g. on failed ring test.
Seen on PA-RISC machine having "radeon: ring test failed (scratch(0x8504)=0xCAFEDEAD)" issue.

v2: agd5f: add some parens around ring->ready check

Signed-off-by: Alex Ivanov <gnidorah@p0n4ik.tk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/radeon_ring.c