Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jD91mZM2
kernel
Commits
f13c84c1
Verified
Commit
f13c84c1
authored
4 years ago
by
jD91mZM2
Browse files
Options
Downloads
Patches
Plain Diff
Add comment about why this doesn't work
parent
886b2bf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/memory.rs
+8
-0
8 additions, 0 deletions
src/scheme/memory.rs
with
8 additions
and
0 deletions
src/scheme/memory.rs
+
8
−
0
View file @
f13c84c1
...
...
@@ -178,6 +178,14 @@ impl Scheme for MemoryScheme {
fn
funmap3
(
&
self
,
flags
:
usize
,
address
:
usize
,
size
:
usize
)
->
Result
<
usize
>
{
let
flags
=
u8
::
try_from
(
flags
)
.ok
()
.and_then
(
Flags
::
from_bits
)
.expect
(
"MemoryScheme::funmap3: bits contained bad flags"
);
// OH NO!! The `funmap` system call will unmap the grant by default, but
// we haven't necessarily created a grant with fmap, we may very well
// just have given the pointer of a physical region!
//
// This will fail!! Is this "abuse" of fmap bad? Do we keep the phys*
// functions instead? If no, how do we fix this? Do we make each kernel
// scheme responsible for clearing up the grants themselves?
if
flags
.contains
(
Flags
::
MODE_PHYSICAL
)
{
driver
::
inner_physfree
(
address
,
size
)
}
else
if
flags
.contains
(
Flags
::
MODE_PHYSMAP
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment