merged. Bruce
In message: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc & v6.1/standard/nxp-sdk-6.1/nxp-soc][PATCH] video: fbdev: mxc: hdmi: Fix a memory leak in mxc_hdmi_disp_init on 16/08/2023 Xiaolei Wang wrote: > When mxc_hdmi_disp_init returns failure, hdmi->fbi->modelist needs > to be released in mxc_hdmi_disp_deinit(), this patch solves the > following memory leaks: > > unreferenced object 0xc52a45c0 (size 64): > comm "swapper/0", pid 1, jiffies 4294937844 (age 159.630s) > hex dump (first 32 bytes): > 80 45 2a c5 00 46 2a c5 00 00 00 00 32 00 00 00 .E*..F*.....2... > 80 07 00 00 38 04 00 00 4e 1a 00 00 94 00 00 00 ....8...N....... > backtrace: > [<409cb2e6>] kmalloc_trace+0x30/0x60 > [<0417ea10>] fb_add_videomode+0xfc/0x14c > [<ca3695cf>] mxc_hdmi_disp_init+0x3b8/0x908 > [<70d3b62e>] mxc_dispdrv_gethandle+0x70/0xc4 > [<eb8524ea>] mxcfb_probe+0xa00/0xea0 > [<478fecea>] platform_probe+0x64/0xb8 > [<a153cd9f>] really_probe+0xd0/0x2f4 > [<0131a04b>] __driver_probe_device+0x90/0x1a8 > [<c1cc6e5a>] driver_probe_device+0x38/0x110 > [<f71c181c>] __driver_attach+0x9c/0x188 > [<d0bad9d4>] bus_for_each_dev+0x84/0xcc > [<537260d8>] bus_add_driver+0x16c/0x1f8 > [<1df9678d>] driver_register+0x90/0x124 > [<75e3b051>] do_one_initcall+0x84/0x330 > [<eb7a33dc>] kernel_init_freeable+0x2a4/0x2fc > [<f9ab798f>] kernel_init+0x20/0x140 > > Signed-off-by: Xiaolei Wang <[email protected]> > --- > drivers/video/fbdev/mxc/mxc_hdmi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/video/fbdev/mxc/mxc_hdmi.c > b/drivers/video/fbdev/mxc/mxc_hdmi.c > index 66783a691455..222d5946ae6b 100644 > --- a/drivers/video/fbdev/mxc/mxc_hdmi.c > +++ b/drivers/video/fbdev/mxc/mxc_hdmi.c > @@ -2712,6 +2712,7 @@ static void mxc_hdmi_disp_deinit(struct > mxc_dispdrv_handle *disp) > > dev_dbg(&hdmi->pdev->dev, "%s\n", __func__); > > + fb_destroy_modelist(&hdmi->fbi->modelist); > device_remove_file(&hdmi->pdev->dev, &dev_attr_fb_name); > device_remove_file(&hdmi->pdev->dev, &dev_attr_cable_state); > device_remove_file(&hdmi->pdev->dev, &dev_attr_edid); > -- > 2.25.1 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12987): https://lists.yoctoproject.org/g/linux-yocto/message/12987 Mute This Topic: https://lists.yoctoproject.org/mt/100772366/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
