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: <1321485715.12374.56.camel@nimitz>
Date:	Wed, 16 Nov 2011 15:21:55 -0800
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Cong Wang <amwang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	Hugh Dickins <hughd@...gle.com>, linux-mm@...ck.org,
	Lennart Poettering <lennart@...ttering.net>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [Patch] tmpfs: add fallocate support

On Wed, 2011-11-16 at 15:21 +0800, Cong Wang wrote:
> 于 2011年11月16日 01:43, Dave Hansen 写道:
> > On Tue, 2011-11-15 at 18:23 +0800, Cong Wang wrote:
> >>> +	if (!(mode&   FALLOC_FL_KEEP_SIZE)) {
> >>> +		ret = inode_newsize_ok(inode, (offset + len));
> >>> +		if (ret)
> >>> +			return ret;
> >>> +	}
> >
> > inode_newsize_ok()'s comments say:
> >
> >   * inode_newsize_ok must be called with i_mutex held.
> >
> > But I don't see any trace of it.
> 
> Hmm, even for tmpfs? I see none of the tmpfs code takes
> i_mutex lock though...

Look harder. :)

ramfs/tmpfs for a large part just used the generic VFS functions to do
their work since they're page-cache based.  For instance:

static const struct file_operations shmem_file_operations = {
...
        .aio_write      = generic_file_aio_write,

IOW, you need to check beyond mm/shmem.c.

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