[PATCH 0/1] drm/vc4: drv: Add error handding for bind
From: Hoegeun Kwon
Date: Tue Oct 27 2020 - 00:15:53 EST
Hello all,
There is a problem that if vc4_drm bind fails, a memory leak occurs on
the drm_property_create side as shown below. Add error handding for
drm_mode_config.
unreferenced object 0xffffff80f5a7a6c8 (size 576):
comm "swapper/0", pid 1, jiffies 4294892559 (age 181.448s)
hex dump (first 32 bytes):
00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f8 f1 0e f5 80 ff ff ff e0 a6 a7 f5 80 ff ff ff ................
backtrace:
[<00000000fd3656dc>] kmem_cache_alloc+0x1a4/0x328
[<000000009dfa1aab>] radix_tree_node_alloc.constprop.19+0x50/0x108
[<00000000a9f1657b>] idr_get_free+0x21c/0x2b8
[<0000000099f2eea6>] idr_alloc_u32+0x68/0xf0
[<00000000525beb52>] idr_alloc+0x44/0x80
[<00000000dbfbaa4b>] __drm_mode_object_add+0x64/0xc0
[<000000002c24dfc8>] drm_mode_object_add+0x3c/0x50
[<00000000f45b491f>] drm_property_create+0xf0/0x1a0
[<000000002e1a296b>] drm_connector_create_standard_properties+0x30/0x130
[<000000007c53e4bd>] drm_mode_config_init+0x138/0x498
[<00000000cc1b0767>] vc4_drm_bind+0x168/0x1f8
[<0000000041d69f98>] try_to_bring_up_master+0x180/0x1e8
[<00000000d1e1caae>] component_master_add_with_match+0xbc/0x108
[<0000000085cea46d>] vc4_platform_drm_probe+0xd8/0x108
[<00000000eacabf20>] platform_drv_probe+0x58/0xa8
[<000000003822d094>] really_probe+0x10c/0x350
Best regards,
Hoegeun
Hoegeun Kwon (1):
drm/vc4: drv: Add error handding for bind
drivers/gpu/drm/vc4/vc4_drv.c | 1 +
1 file changed, 1 insertion(+)
--
2.17.1