lkml.org 
[lkml]   [2004]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 7/7] shmem: Copyright file_setup trivia
    I _think_ shmem_file_setup is protected against negative loff_t size by
    the TASK_SIZE in each arch, but prefer the security of an explicit test.
    Wipe those parentheses off its return(file), and update our Copyright.

    Signed-off-by: Hugh Dickins <hugh@veritas.com>
    ---

    mm/shmem.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    --- shmem6/mm/shmem.c 2004-09-05 17:06:41.258138744 +0100
    +++ shmem7/mm/shmem.c 2004-09-05 17:06:52.371449264 +0100
    @@ -6,8 +6,8 @@
    * 2000-2001 Christoph Rohland
    * 2000-2001 SAP AG
    * 2002 Red Hat Inc.
    - * Copyright (C) 2002-2003 Hugh Dickins.
    - * Copyright (C) 2002-2003 VERITAS Software Corporation.
    + * Copyright (C) 2002-2004 Hugh Dickins.
    + * Copyright (C) 2002-2004 VERITAS Software Corporation.
    * Copyright (C) 2004 Andi Kleen, SuSE Labs
    *
    * This file is released under the GPL.
    @@ -2099,7 +2099,7 @@ struct file *shmem_file_setup(char *name
    if (IS_ERR(shm_mnt))
    return (void *)shm_mnt;

    - if (size > SHMEM_MAX_BYTES)
    + if (size < 0 || size > SHMEM_MAX_BYTES)
    return ERR_PTR(-EINVAL);

    if (shmem_acct_size(flags, size))
    @@ -2133,7 +2133,7 @@ struct file *shmem_file_setup(char *name
    file->f_mapping = inode->i_mapping;
    file->f_op = &shmem_file_operations;
    file->f_mode = FMODE_WRITE | FMODE_READ;
    - return(file);
    + return file;

    close_file:
    put_filp(file);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:0.023 / U:91.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site