Changeset cd3b380 in mainline for kernel/test/mm/falloc1.c


Ignore:
Timestamp:
2013-09-11T11:56:39Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1db5669
Parents:
43dd8028
Message:

due to the removal of FRAME_KA, the return value of frame_alloc*() needs to be checked before converting the physical address to kernel address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc1.c

    r43dd8028 rcd3b380  
    6262                        unsigned int allocated = 0;
    6363                        for (unsigned int i = 0; i < (MAX_FRAMES / count); i++) {
    64                                 frames[allocated] =
    65                                     PA2KA(frame_alloc(count, FRAME_ATOMIC, 0));
    66                                
    67                                 if (frames[allocated])
     64                                frames[allocated] = frame_alloc(count, FRAME_ATOMIC, 0);
     65                                if (frames[allocated]) {
    6866                                        allocated++;
    69                                 else {
     67                                } else {
    7068                                        TPRINTF("done. ");
    7169                                        break;
     
    8482                       
    8583                        for (unsigned int i = 0; i < allocated; i++)
    86                                 frame_free(KA2PA(frames[i]), count);
     84                                frame_free(frames[i], count);
    8785                       
    8886                        TPRINTF("done.\n");
Note: See TracChangeset for help on using the changeset viewer.