Bug 11099 - nfs: fix memory leak in error path of nfs4_do_reclaim
Summary: nfs: fix memory leak in error path of nfs4_do_reclaim
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: HLjksuga
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-26 20:00 UTC by HLjksuga
Modified: 2024-09-27 13:43 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 HLjksuga inspur_group 2024-09-26 20:00:38 UTC
Commit c77e22834ae9 ("NFSv4: Fix a potential sleep while atomic in
    nfs4_do_reclaim()") separate out the freeing of the state owners from
    nfs4_purge_state_owners() and finish it outside the rcu lock.
    However, the error path is omitted. As a result, the state owners in
    "freeme" will not be released.
    Fix it by adding freeing in the error path.
Comment 1 小龙 admin 2024-09-27 09:27:53 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3868
Comment 2 Joseph Qi alibaba_cloud_group 2024-09-27 13:43:37 UTC
(In reply to 小龙 from comment #1)
> The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3868

merged