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]
Date:	Thu, 3 Oct 2013 13:58:22 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Davidlohr Bueso <davidlohr@...com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>, aswin@...com,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH 1/2] mm,fs: introduce helpers around i_mmap_mutex

On Wed,  2 Oct 2013 13:17:45 -0700 Davidlohr Bueso <davidlohr@...com> wrote:

> Various parts of the kernel acquire and release this mutex,
> so add i_mmap_lock_write() and immap_unlock_write() helper
> functions that will encapsulate this logic. The next patch
> will make use of these.
> 
> ...
>
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -478,6 +478,16 @@ struct block_device {
>  
>  int mapping_tagged(struct address_space *mapping, int tag);
>  
> +static inline void i_mmap_lock_write(struct address_space *mapping)
> +{
> +	mutex_lock(&mapping->i_mmap_mutex);
> +}

I don't understand the thinking behind the "_write".  There is no
"_read" and all callsites use "_write", so why not call it
i_mmap_lock()?

I *assume* the answer is "so we can later convert some sites to a new
i_mmap_lock_read()".  If so, the changelog should have discussed this. 
If not, still confused.


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