Re: [PATCH] mm/rmap: synchronize lock and unlock target in anon_vma_clone
Seohyun Kim <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <OS7PR01MB13914906DFF1C9AF471A5B46996D82@OS7PR01MB13914.jpnprd01.prod.outlook.com> |
On 8/15/26 14:21, Barry Song wrote: > On Fri, Aug 14, 2026 at 2:33 PM Eric Kim <[email protected]> wrote: >> Currently, in anon_vma_clone(), src vma's anon_vma is assigned to >> active_anon_vma and is used when unlocking anon_vma after linking new >> AVCs. However, the anon_vma is locked using src->anon_vma, instead of >> active_anon_vma, making the lock and unlock target inconsistent. > I'm not a native speaker, but I feel the lock and unlock are actually > consistent and operate on the same anon_vma. The code just looks > unpaired: one uses src->anon_vma, while the other uses > active_anon_vma. But aren't they actually the same thing? You're right. My original commit message does come as confusing because it sounds like there's an actual lock/unlock target mismatch. (I'm not a native speaker too) My intent was to match the variable name for locking and unlocking, and since active_anon_vma is the implemented alias for src->anon_vma, anon_vma_clone() should consistently use active_anon_vma. Should I send a v2 to clarify the commit message? > Not an objection to the patch; I just find the changelog a bit > confusing. > >> Use active_anon_vma for both locking and unlocking. >> >> Signed-off-by: Eric Kim <[email protected]> > Best Regards > Barry Thanks for the feedback. Eric Kim