diff --git a/kernel/src/fs/procfs/pid/task/oom_score_adj.rs b/kernel/src/fs/procfs/pid/task/oom_score_adj.rs index 47eeb3302..652f9107f 100644 --- a/kernel/src/fs/procfs/pid/task/oom_score_adj.rs +++ b/kernel/src/fs/procfs/pid/task/oom_score_adj.rs @@ -43,6 +43,7 @@ impl FileOps for OomScoreAdjFileOps { let val = cstr .to_str() .ok() + .map(|str| str.trim()) .and_then(|str| str.parse::().ok()) .ok_or_else(|| { Error::with_message(Errno::EINVAL, "the value is not a valid integer")