summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-06-15 15:42:39 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-06-15 15:43:24 +0200
commitf7e5542dc13519cc78c204b4062acb0b71296a58 (patch)
treeefcdaaa25d08daadcd27e0597a0fb20defc49a23
parente0bf2a4d7145f63a9051dd23b012334c3350d383 (diff)
fix: fix invalid bounds check in `DmaPool.h`'s `rtl_dma_alloc`v0.0.3e1
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org> Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--dev/kernel/DmaKit/DmaPool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/kernel/DmaKit/DmaPool.h b/dev/kernel/DmaKit/DmaPool.h
index ca7c72c7..ada8299e 100644
--- a/dev/kernel/DmaKit/DmaPool.h
+++ b/dev/kernel/DmaKit/DmaPool.h
@@ -51,7 +51,7 @@ inline VoidPtr rtl_dma_alloc(SizeT size, SizeT align) {
/// really.
addr = (addr + (align - 1)) & ~(align - 1);
- if ((addr + size) >= reinterpret_cast<UIntPtr>(kDmaPoolEnd)) {
+ if ((addr + size) > reinterpret_cast<UIntPtr>(kDmaPoolEnd)) {
err_global_get() = kErrorDmaExhausted;
return nullptr;
}