• Hugh Dickins's avatar
    [PATCH] SHMEM_MAX_BYTES overflow checking · 36372380
    Hugh Dickins authored
    shmem_notify_change and shmem_file_write be careful about overflowingly
    large loff_t before shifting it into unsigned long for vm_enough_memory.
    Rename SHMEM_MAX_BLOCKS to SHMEM_MAX_INDEX (to avoid confusion with
    512-byte blocks), define SHMEM_MAX_BYTES from it.
    
    But 2.5 vmtruncate lacked the s_maxbytes error handling which
    shmem_notify_change now expects: bring it in from the -dj tree.
    shmem_file_write error handling needs a closer look later on.
    36372380
shmem.c 40.7 KB