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] [day] [month] [year] [list]
Date:	Tue, 17 May 2016 22:34:20 +0200
From:	Michal Hocko <mhocko@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2 1/1] userfaultfd: don't pin the user memory in
 userfaultfd_file_create()

On Tue 17-05-16 18:30:44, Oleg Nesterov wrote:
> On 05/17, Michal Hocko wrote:
> >
> > On Mon 16-05-16 19:22:54, Oleg Nesterov wrote:
> >
> > > The patch adds the new trivial helper, mmget_not_zero(), it can have more users.
> >
> > Is this really helpful?
> 
> Well, this is subjective of course, but I think the code looks a bit better this
> way. uprobes, fs/proc and more can use this helper too.
> 
> And in fact the initial version of this patch did atomic_inc_not_zero(mm->users) by
> hand, then it was suggested to add a helper.

I would prefer a more descriptive name (something like mmget_alive) but
as you say this is highly subjective and nothing that should delay this
fix.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ