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
redox-os
kernel
Commits
5f4978a6
Verified
Commit
5f4978a6
authored
4 years ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Return ENOMEM rather than panicking for PML4 alloc.
parent
67cc6799
No related branches found
No related tags found
1 merge request
!187
No more recursive mapping
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syscall/process.rs
+1
-1
1 addition, 1 deletion
src/syscall/process.rs
with
1 addition
and
1 deletion
src/syscall/process.rs
+
1
−
1
View file @
5f4978a6
...
...
@@ -342,7 +342,7 @@ pub fn clone(flags: CloneFlags, stack_base: usize) -> Result<ContextId> {
let
mut
active_ktable
=
unsafe
{
ActivePageTable
::
new
(
TableKind
::
Kernel
)
};
let
mut
new_utable
=
unsafe
{
let
frame
=
allocate_frames
(
1
)
.
expect
(
"no more frames in syscall::clone new_table"
)
;
let
frame
=
allocate_frames
(
1
)
.
ok_or
(
Error
::
new
(
ENOMEM
))
?
;
// SAFETY: This is safe because the frame is exclusive, owned, and valid, as we
// have just allocated it.
InactivePageTable
::
new
(
&
mut
active_utable
,
frame
)
...
...
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