Skip to content
Snippets Groups Projects
Commit 79de74bf authored by Anhad Singh's avatar Anhad Singh :crab:
Browse files

fix(scheme/itimer): wrong chunk size


Chunk size of the scheme (`size_of::<ITimerScheme>() == 0`) was being
provided instead of `size_of::<ITimerSpec>()`. This resulted in a kernel
panic (division by zero) when kread was called for this scheme.

Signed-off-by: default avatarAnhad Singh <andypython@protonmail.com>
parent 7a530cf0
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ impl KernelScheme for ITimerScheme { ...@@ -69,7 +69,7 @@ impl KernelScheme for ITimerScheme {
let mut specs_read = 0; let mut specs_read = 0;
for current_chunk in buf.in_exact_chunks(mem::size_of::<ITimerScheme>()) { for current_chunk in buf.in_exact_chunks(mem::size_of::<ITimerSpec>()) {
current_chunk.copy_exactly(&ITimerSpec::default())?; current_chunk.copy_exactly(&ITimerSpec::default())?;
specs_read += 1; specs_read += 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment