linux_dsm_epyc7002/drivers/gpu/drm/radeon
Ilija Hadzic 1da80cfa87 drm/radeon: fix a rare case of double kfree
If one (but not both) allocations of p->chunks[].kpage[]
in radeon_cs_parser_init fail, the error path will free
the successfully allocated page, but leave a stale pointer
value in the kpage[] field. This will later cause a
double-free when radeon_cs_parser_fini is called.
This patch fixes the issue by forcing both pointers to NULL
after kfree in the error path.

The circumstances under which the problem happens are very
rare. The card must be AGP and the system must run out of
kmalloc area just at the right time so that one allocation
succeeds, while the other fails.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2013-01-23 14:50:05 -05:00
..
reg_srcs drm/radeon: allow FP16 color clear registers on r500 2013-01-15 09:07:12 -05:00
.gitignore
atom-bits.h
atom-names.h
atom-types.h
atom.c
atom.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
atombios_crtc.c drm/radeon/dce32+: use fractional fb dividers for high clocks 2012-12-07 19:48:22 -05:00
atombios_dp.c drm: extract drm_dp_max_lane_count helper 2012-10-22 22:56:43 +02:00
atombios_encoders.c drm/radeon: fix eDP clk and lane setup for scaled modes 2012-12-07 19:48:23 -05:00
atombios_i2c.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
atombios.h
avivod.h
cayman_blit_shaders.c
cayman_blit_shaders.h
evergreen_blit_kms.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
evergreen_blit_shaders.c
evergreen_blit_shaders.h
evergreen_cs.c drm/radeon: add WAIT_UNTIL to evergreen VM safe reg list 2012-12-21 11:12:39 -05:00
evergreen_hdmi.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
evergreen_reg.h drm/radeon: properly handle mc_stop/mc_resume on evergreen+ (v2) 2012-09-20 13:10:33 -04:00
evergreen.c drm/radeon: clear reset flags if engines are idle 2013-01-15 09:06:38 -05:00
evergreend.h drm/radeon: switch to a finer grained reset for evergreen 2013-01-03 21:28:49 -05:00
Kconfig
Makefile drm/radeon: add PRIME support (v2) 2012-05-23 10:47:11 +01:00
mkregtable.c
ni_reg.h
ni.c drm/radeon: clear reset flags if engines are idle 2013-01-15 09:06:38 -05:00
nid.h drm/radeon: reset dma engine on gpu reset (v2) 2013-01-03 13:18:41 -05:00
ObjectID.h
r100_track.h
r100.c drm/radeon: make indirect register access concurrency-safe 2012-12-14 10:45:23 -05:00
r100d.h
r200.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
r300_cmdbuf.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
r300_reg.h
r300.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
r300d.h
r420.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
r420d.h
r500_reg.h
r520.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
r520d.h
r600_audio.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
r600_blit_kms.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
r600_blit_shaders.c
r600_blit_shaders.h Annotate int2float() as being a pure function. 2012-09-20 13:10:34 -04:00
r600_blit.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
r600_cp.c drm/radeon: Use hweight32 2012-11-20 16:06:18 +10:00
r600_cs.c radeon/kms: fix dma relocation checking 2013-01-10 17:05:38 -05:00
r600_hdmi.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
r600_reg.h drm/radeon: improve mc_stop/mc_resume on r5xx-r7xx 2012-12-12 14:34:08 -05:00
r600.c drm/radeon: clear reset flags if engines are idle 2013-01-15 09:06:38 -05:00
r600d.h drm/radeon: add register headers for CP DMA on r6xx-SI 2012-12-12 17:16:48 -05:00
radeon_acpi.c drm/radeon: fix compilation with backlight disabled 2012-10-15 13:21:00 -04:00
radeon_acpi.h drm/radeon: implement handler for ACPI event 2012-09-20 13:10:36 -04:00
radeon_agp.c radeon: add AGPMode 1 quirk for RV250 2012-11-20 11:47:32 -05:00
radeon_asic.c drm/radeon: split r6xx and r7xx copy_dma functions 2013-01-04 09:29:54 -05:00
radeon_asic.h drm/radeon: split r6xx and r7xx copy_dma functions 2013-01-04 09:29:54 -05:00
radeon_atombios.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_atpx_handler.c drm/radeon: fix ATPX function documentation 2012-11-01 10:34:32 -04:00
radeon_benchmark.c drm/radeon: remove radeon_fence_create 2012-06-21 09:38:35 +02:00
radeon_bios.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_blit_common.h
radeon_clocks.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_combios.c drm/radeon: add connector table for Mac G4 Silver 2013-01-03 10:16:11 -05:00
radeon_connectors.c drm/radeon: Properly handle DDC probe for DP bridges 2013-01-03 15:04:38 -05:00
radeon_cp.c drm/radeon: add W|RREG32_IDX for MM_INDEX|DATA based mmio accesss 2012-12-14 10:45:22 -05:00
radeon_cs.c drm/radeon: fix a rare case of double kfree 2013-01-23 14:50:05 -05:00
radeon_cursor.c drm/radeon: fix cursor corruption on DCE6 and newer 2013-01-23 13:51:43 -05:00
radeon_device.c drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks 2013-01-07 10:13:36 -05:00
radeon_display.c radeon_display: Use pointer return error codes 2013-01-23 13:51:44 -05:00
radeon_drv.c drm/radeon: allow FP16 color clear registers on r500 2013-01-15 09:07:12 -05:00
radeon_drv.h drm/radeon: add W|RREG32_IDX for MM_INDEX|DATA based mmio accesss 2012-12-14 10:45:22 -05:00
radeon_encoders.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_family.h
radeon_fb.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_fence.c drm/radeon: avoid deadlock in pm path when waiting for fence 2012-12-19 17:44:05 -05:00
radeon_gart.c drm/radeon: allow move_notify to be called without reservation 2012-12-10 20:13:49 +10:00
radeon_gem.c drm/radeon: move the retry to gem_object_create 2012-10-24 11:41:56 -04:00
radeon_i2c.c drm/radeon: Properly handle DDC probe for DP bridges 2013-01-03 15:04:38 -05:00
radeon_ioc32.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_irq_kms.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_irq.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_kms.c drm/radeon: add new INFO ioctl requests 2012-12-07 19:48:22 -05:00
radeon_legacy_crtc.c DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms(). 2012-11-01 10:34:34 -04:00
radeon_legacy_encoders.c radeon/kms: force rn50 chip to always report connected on analog output 2013-01-10 17:05:37 -05:00
radeon_legacy_tv.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_mem.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_mode.h drm/radeon: Properly handle DDC probe for DP bridges 2013-01-03 15:04:38 -05:00
radeon_object.c Revert "drm/radeon: do not move bo to different placement at each cs" 2013-01-17 13:10:50 -05:00
radeon_object.h drm/radeon: Use ttm_bo_is_reserved 2012-11-07 10:58:14 +10:00
radeon_pm.c drm/radeon: avoid deadlock in pm path when waiting for fence 2012-12-19 17:44:05 -05:00
radeon_prime.c drm/prime: drop reference on imported dma-buf come from gem 2013-01-08 14:41:53 +10:00
radeon_reg.h
radeon_ring.c drm/radeon: improve semaphore debugging on lockup 2013-01-15 09:07:13 -05:00
radeon_sa.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
radeon_semaphore.c drm/radeon: improve semaphore debugging on lockup 2013-01-15 09:07:13 -05:00
radeon_state.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_test.c drm/radeon/kms: add support for dma rings to radeon_test_moves() 2012-12-10 16:53:47 -05:00
radeon_trace_points.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
radeon_trace.h
radeon_ttm.c drm/ttm: remove no_wait_reserve, v3 2012-12-10 20:21:30 +10:00
radeon.h Revert "drm/radeon: do not move bo to different placement at each cs" 2013-01-17 13:10:50 -05:00
rs100d.h
rs400.c drm/radeon: Mark all possible functions / structs as static 2012-09-20 13:10:41 -04:00
rs400d.h
rs600.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
rs600d.h
rs690.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
rs690d.h
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon: improve mc_stop/mc_resume on r5xx-r7xx 2012-12-12 14:34:08 -05:00
rv515d.h
rv770.c drm/radeon: split r6xx and r7xx copy_dma functions 2013-01-04 09:29:54 -05:00
rv770d.h drm/radeon/kms: Add initial support for async DMA on r6xx/r7xx 2012-12-10 16:53:23 -05:00
si_blit_shaders.c
si_blit_shaders.h
si_reg.h drm/radeon: SI tiling fixes for display 2012-06-20 19:55:56 +01:00
si.c drm/radeon: clear reset flags if engines are idle 2013-01-15 09:06:38 -05:00
sid.h drm/radeon: reset dma engine on gpu reset (v2) 2013-01-03 13:18:41 -05:00