Do not allow recursively registering the same event queue

This commit is contained in:
Jeremy Soller
2026-01-09 12:08:16 -07:00
parent a245e49e75
commit ea06685903
+6
View File
@@ -59,6 +59,12 @@ impl EventQueue {
(description.scheme, description.number)
};
if scheme == GlobalSchemes::Event.scheme_id() && number == self.id.into() {
// Do not allow recursively registering the same event queue
//TODO: should we also disallow event queues that contain this event queue?
return Err(Error::new(EBADF));
}
register(
RegKey { scheme, number },
QueueKey {