-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
PerCoreScheduler::current_task
is currently an Rc<RefCell<Task>>
. Accesses to the RefCell
are currently explicitly without_interrupts
:
Lines 576 to 584 in 53536a5
/// Remove a IO interface, which is named by the file descriptor | |
pub fn remove_object(&self, fd: FileDescriptor) -> io::Result<Arc<dyn ObjectInterface>> { | |
without_interrupts(|| { | |
let current_task = self.current_task.borrow(); | |
let mut object_map = current_task.object_map.write(); | |
object_map.remove(&fd).ok_or(Errno::Badf) | |
}) | |
} |
fbc6044 mistakenly removed without_interrupts
from PerCoreScheduler::get_object
, resulting in spurious panics at
Line 748 in 53536a5
let mut borrowed = self.current_task.borrow_mut(); |
It would be beneficial to use an InterruptRefCell
instead of a RefCell
to ensure interrupts are disabled.
Related: #1846
Metadata
Metadata
Assignees
Labels
No labels