merged.

Bruce

In message: [linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] 
drm/bridge: adv7511: fix a memory leak when application changeset fails
on 13/04/2021 Xiaolei Wang wrote:

> Changeset application failure should be destroyed
> 
> unreferenced object 0xffff0008f2656480 (size 128):
>   comm "kworker/2:1", pid 83, jiffies 4294893570 (age 70.724s)
>   hex dump (first 32 bytes):
>     c0 b6 db 11 00 80 ff ff c0 b6 db 11 00 80 ff ff  ................
>     02 00 00 00 00 00 00 00 28 9e 45 ff 08 00 ff ff  ........(.E.....
>   backtrace:
>     [<00000000716ba1d6>] kmem_cache_alloc_trace+0x198/0x3a4
>     [<00000000ada5a5e3>] of_changeset_action+0x44/0xb4
>     [<00000000c16b0c5f>] adv7511_probe+0x8c4/0x948
>     [<000000009d4149ff>] i2c_device_probe+0x24c/0x2cc
>     [<00000000f69bde36>] really_probe+0xec/0x414
>     [<00000000453d11fb>] driver_probe_device+0x60/0xf0
>     [<00000000b1fb76a2>] __device_attach_driver+0xb0/0x100
>     [<00000000e99e535e>] bus_for_each_drv+0x8c/0xe0
>     [<00000000b21b29c0>] __device_attach+0xe0/0x180
>     [<000000002d2d1388>] device_initial_probe+0x28/0x34
>     [<00000000bf4902c7>] bus_probe_device+0xa4/0xb0
>     [<00000000c14ec780>] device_add+0x35c/0x670
>     [<00000000b9ff486a>] device_register+0x2c/0x40
>     [<00000000a898d8bc>] i2c_new_client_device+0x150/0x28c
>     [<000000000505c5a6>] i2c_new_device+0x2c/0x40
>     [<00000000b0c53a83>] of_i2c_register_devices+0xe8/0x180
> 
> Signed-off-by: Xiaolei Wang <xiaolei.w...@windriver.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c 
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index d8989e0c040b..74e390896921 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1388,10 +1388,12 @@ static int adv7511_probe(struct i2c_client *i2c, 
> const struct i2c_device_id *id)
>       of_changeset_init(&ocs);
>       of_changeset_detach_node(&ocs, endpoint);
>       ret = of_changeset_apply(&ocs);
> -     if (!ret)
> +     if (!ret) {
> +             of_changeset_destroy(&ocs);
>               dev_warn(dev,
>                        "Probe failed. Remote port '%s' disabled\n",
>                        remote_node->full_name);
> +     }
>  
>       return ret;
>  }
> -- 
> 2.29.2
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9750): 
https://lists.yoctoproject.org/g/linux-yocto/message/9750
Mute This Topic: https://lists.yoctoproject.org/mt/82058891/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to