Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken

From: Arjan van de Ven (arjan_at_infradead.org)
Date: 11/30/04

  • Next message: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"
    To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
    Date:	Tue, 30 Nov 2004 08:34:20 +0100
    
    

    On Mon, 2004-11-29 at 21:38 +0000, Linux Kernel Mailing List wrote:
    > ChangeSet 1.2251, 2004/11/29 13:38:43-08:00, mtk-lkml@gmx.net
    >
    > - spin_lock(&shmlock_user_lock);
    > - locked = size >> PAGE_SHIFT;
    > + locked = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
    > lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
    > lock_limit >>= PAGE_SHIFT;
    > + spin_lock(&shmlock_user_lock);

    after this change... isn't the use to the
    current->signal->rlim[RLIMIT_MEMLOCK] entirely unlocked and thus racey ?

    -- 
    -
    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/
    

  • Next message: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"

    Relevant Pages

    • Re: [2.6.16rc2] compile error
      ... To unsubscribe from this list: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ... Copyright 2006 by Maurice Eugene Heskett, ...
      (Linux-Kernel)
    • Re: [patch 0/14] s3c2412/s3c2413 support
      ... implementations. ... To unsubscribe from this list: ... Please read the FAQ at http://www.tux.org/lkml/ ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: Fwd: Registration Weakness in Linux Kernels Binary formats
      ... Subject: Registration Weakness in Linux Kernel's Binary formats To: ... To unsubscribe from this list: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe ...
      (Linux-Kernel)
    • Re: Suspend to RAM generates oops and general protection fault
      ... he said it looked like a CPU hotplug ... To unsubscribe from this list: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: potential security issue
      ... Please provide me with a PGP key. ... To unsubscribe from this list: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)