lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1213119688.13882.13.camel@nimitz>
Date:	Tue, 10 Jun 2008 10:41:28 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Andrea Righi <righi.andrea@...il.com>
Cc:	balbir@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	kosaki.motohiro@...fujitsu.com, containers@...ts.osdl.org,
	menage@...gle.com, xemul@...nvz.org
Subject: Re: [RFC PATCH 5/5] refresh VM committed space after a task
	migration

On Tue, 2008-06-10 at 01:33 +0200, Andrea Righi wrote:
> +       preempt_disable();
> +       committed = atomic_long_read(&p->vm_committed_space);
> +       atomic_long_sub(committed, &old_mem->vmacct.vm_committed_space);
> +       atomic_long_add(committed, &mem->vmacct.vm_committed_space);
> +       preempt_enable();
>  out:
>         mmput(mm);
>  }

Why bother with the preempt stuff here?  What does the actually protect
against?  I assume that you're trying to keep other tasks that might run
on this CPU from seeing weird, inconsistent numbers in here.  Is there
some other looks that keeps *other* cpus from seeing this?

In any case, I think it needs a big, fat comment.

-- Dave

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ