Changeset dbbeb26 in mainline


Ignore:
Timestamp:
2006-04-24T19:52:58Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df0103f7
Parents:
fd8af4b
Message:

Do not allow zero size address space areas.

File:
1 edited

Legend:

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

    rfd8af4b rdbbeb26  
    138138                return NULL;
    139139
     140        if (!size)
     141                return NULL;
     142
    140143        /* Writeable executable areas are not supported. */
    141144        if ((flags & AS_AREA_EXEC) && (flags & AS_AREA_WRITE))
     
    462465
    463466        pages = SIZE2FRAMES((address - area->base) + size);
     467        if (!pages) {
     468                /*
     469                 * Zero size address space areas are not allowed.
     470                 */
     471                spinlock_unlock(&area->lock);
     472                spinlock_unlock(&as->lock);
     473                interrupts_restore(ipl);
     474                return (__address) -1;
     475        }
     476       
    464477        if (pages < area->pages) {
    465478                int i;
Note: See TracChangeset for help on using the changeset viewer.