Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 326bf65 in mainline


Ignore:
Timestamp:
2011-05-19T23:13:50Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
712c4ba, 98e4507
Parents:
2f23341
Message:

Fix an unsigned overflow which prevented proper handling of page faults
in address space areas ending on the last page of the entire virtual
address range.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r2f23341 r326bf65  
    482482       
    483483        /*
    484          * Search the leaf node and the righmost record of its left neighbour
     484         * Search the leaf node and the rightmost record of its left neighbour
    485485         * to find out whether this is a miss or va belongs to an address
    486486         * space area found there.
     
    494494               
    495495                mutex_lock(&area->lock);
    496                
    497                 if ((area->base <= va) &&
    498                     (va < area->base + (area->pages << PAGE_WIDTH)))
     496
     497                size_t size = area->pages << PAGE_WIDTH;
     498                if ((area->base <= va) && (va <= area->base + (size - 1)))
    499499                        return area;
    500500               
Note: See TracChangeset for help on using the changeset viewer.