|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 2/7] xeniface: Match the grant request identifier mode in queue lookups
From: Rafał Wojdyła <omeg@xxxxxxx>
Require both requests to use the same identifier mode before comparing
their request IDs or user addresses. An address-based lookup must not
select or collide with a legacy request that happens to use the same address.
Assisted-by: LLM
Signed-off-by: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>
---
src/xeniface/irp_queue.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/xeniface/irp_queue.c b/src/xeniface/irp_queue.c
index 511a36a..e2506b6 100644
--- a/src/xeniface/irp_queue.c
+++ b/src/xeniface/irp_queue.c
@@ -100,10 +100,10 @@ CsqPeekNextIrp(
BOOL Match = TargetContext->Type == Context->Type &&
TargetContext->Process == Context->Process;
- if (TargetContext->UseRequestId)
- Match = Match &&
- TargetContext->UseRequestId == Context->UseRequestId &&
- TargetContext->RequestId == Context->RequestId;
+ if (TargetContext->UseRequestId != Context->UseRequestId)
+ Match = FALSE;
+ else if (TargetContext->UseRequestId)
+ Match = Match && (TargetContext->RequestId ==
Context->RequestId);
else
Match = Match && (TargetContext->UserVa == Context->UserVa);
--
2.56.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |