Bug 4208 - BUG: a possible memory leak in sdma_transfer_init
Summary: BUG: a possible memory leak in sdma_transfer_init
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-15
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-24 11:13 UTC by tomsun
Modified: 2023-02-28 19:39 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomsun inspur_group 2023-02-24 11:13:15 UTC
Description of problem:

If the function sdma_load_context() fails, the sdma_desc will be
freed, but the allocated desc->bd is forgot to be freed.

We already met the sdma_load_context() failure case and the log as
below:
[ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
...

In this case, the desc->bd will not be freed without this change.
Comment 1 maqiao alibaba_cloud_group 2023-02-28 19:39:36 UTC
merged: https://gitee.com/anolis/cloud-kernel/pulls/1267