Re: [PATCH] error path in setup_arg_pages() misses vm_unacct_memory()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hugh Dickins <[email protected]> wrote:
>
> On Tue, 13 Sep 2005, Andrew Morton wrote:
> > Kirill Korotaev <[email protected]> wrote:
> > >
> > > maybe it is worth moving vm_acct_memory() out of 
> > >  security_vm_enough_memory()?
> > 
> > I think that would be saner, yes.  That means that the callers would call
> > vm_acct_memory() after security_enough_memory(), if that succeeded.
> 
> I don't like that at all.  The implementation of its tests is necessarily
> imprecise, but nonetheless, we do prefer primitives which atomically test
> and reserve.  We're not moving from request_region to check_region, are we?

I don't think that it's any racier to move the allocation to after the
check than to have it before the check.  If we're worried, take mmap_sem -
most place already do that, but not all.

> But change the naming by all means, it was never good,
> and grew worse when "security_" got stuck on the front.

Yes, renaming it to something like alloc_vm_space() would suit.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux