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: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
Anhad Singh
2025-01-16 14:06:28 +11:00
parent 7a530cf0ec
commit 79de74bf3a
+1 -1
View File
@@ -69,7 +69,7 @@ impl KernelScheme for ITimerScheme {
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())?;
specs_read += 1;