Fix logic error in process_rb_search_range()

The function would not properly check if addr is within the block
due to inversed logic in the comparasion.
This commit is contained in:
Tobias Frost 2022-06-23 09:18:43 +02:00
parent 871a79f35b
commit be3b4c22ae

View File

@ -604,7 +604,7 @@ static struct rb_block *process_rb_search_range(struct rb_root *root, unsigned l
while (node) { while (node) {
struct rb_block *this = container_of(node, struct rb_block, node); struct rb_block *this = container_of(node, struct rb_block, node);
if ((addr <= this->addr) && (addr + size > this->addr)) if ((this->addr <= addr) && (this->addr + this->size > addr))
return this; return this;
if (addr < this->addr) if (addr < this->addr)