Patch "drm/radeon: free iio for atombios when driver shutdown" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/radeon: free iio for atombios when driver shutdown

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-radeon-free-iio-for-atombios-when-driver-shutdow.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f6ba6509b3a3aa4d004bf35af7bfc062203d202b
Author: Liwei Song <liwei.song@xxxxxxxxxxxxx>
Date:   Fri Jan 6 17:47:29 2023 +0800

    drm/radeon: free iio for atombios when driver shutdown
    
    [ Upstream commit 4773fadedca918faec443daaca5e4ea1c0ced144 ]
    
    Fix below kmemleak when unload radeon driver:
    
    unreferenced object 0xffff9f8608ede200 (size 512):
      comm "systemd-udevd", pid 326, jiffies 4294682822 (age 716.338s)
      hex dump (first 32 bytes):
        00 00 00 00 c4 aa ec aa 14 ab 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<0000000062fadebe>] kmem_cache_alloc_trace+0x2f1/0x500
        [<00000000b6883cea>] atom_parse+0x117/0x230 [radeon]
        [<00000000158c23fd>] radeon_atombios_init+0xab/0x170 [radeon]
        [<00000000683f672e>] si_init+0x57/0x750 [radeon]
        [<00000000566cc31f>] radeon_device_init+0x559/0x9c0 [radeon]
        [<0000000046efabb3>] radeon_driver_load_kms+0xc1/0x1a0 [radeon]
        [<00000000b5155064>] drm_dev_register+0xdd/0x1d0
        [<0000000045fec835>] radeon_pci_probe+0xbd/0x100 [radeon]
        [<00000000e69ecca3>] pci_device_probe+0xe1/0x160
        [<0000000019484b76>] really_probe.part.0+0xc1/0x2c0
        [<000000003f2649da>] __driver_probe_device+0x96/0x130
        [<00000000231c5bb1>] driver_probe_device+0x24/0xf0
        [<0000000000a42377>] __driver_attach+0x77/0x190
        [<00000000d7574da6>] bus_for_each_dev+0x7f/0xd0
        [<00000000633166d2>] driver_attach+0x1e/0x30
        [<00000000313b05b8>] bus_add_driver+0x12c/0x1e0
    
    iio was allocated in atom_index_iio() called by atom_parse(),
    but it doesn't got released when the dirver is shutdown.
    Fix this kmemleak by free it in radeon_atombios_fini().
    
    Signed-off-by: Liwei Song <liwei.song@xxxxxxxxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index a556b6be11374..e1f3ab607e4f4 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1023,6 +1023,7 @@ void radeon_atombios_fini(struct radeon_device *rdev)
 {
 	if (rdev->mode_info.atom_context) {
 		kfree(rdev->mode_info.atom_context->scratch);
+		kfree(rdev->mode_info.atom_context->iio);
 	}
 	kfree(rdev->mode_info.atom_context);
 	rdev->mode_info.atom_context = NULL;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux