Page MenuHomeFreeBSD

Correct an obscure PV entry leak in the recent change to amd64's pmap_enter()
ClosedPublic

Authored by alc on Jul 4 2018, 7:07 PM.
Tags
None
Referenced Files
F136980104: D16130.id.diff
Thu, Nov 20, 9:51 PM
F136978207: D16130.id44872.diff
Thu, Nov 20, 9:43 PM
F136978024: D16130.id44884.diff
Thu, Nov 20, 9:43 PM
F136976110: D16130.diff
Thu, Nov 20, 9:36 PM
Unknown Object (File)
Wed, Nov 12, 4:43 AM
Unknown Object (File)
Thu, Oct 30, 9:22 AM
Unknown Object (File)
Fri, Oct 24, 2:45 PM
Unknown Object (File)
Fri, Oct 24, 2:45 PM
Subscribers

Details

Summary

Hypothetically, pmap_enter() could replace a managed mapping by an unmanaged mapping, in which case, pmap_enter() would currently leak the unlinked PV entry. This change frees that PV entry when the new mapping is unmanaged.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I noticed this bug while reading the i386 pmap code. :)

This revision is now accepted and ready to land.Jul 4 2018, 7:30 PM
This revision was automatically updated to reflect the committed changes.

I noticed this bug while reading the i386 pmap code. :)

I'm working on the i386 version. As you may have noticed, the i386 pmap has the CoW problem, but not the PV entry allocation problem.