linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git pull] vfs.git fixes for -rc2
@ 2014-02-09 23:36 Al Viro
  2014-02-10 10:47 ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Al Viro @ 2014-02-09 23:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-fsdevel

	A couple of fixes, both -stable fodder.  O_SYNC bug is
fairly old...  Please, pull from the usual place -
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus

Shortlog:
Al Viro (2):
      fix O_SYNC|O_APPEND syncing the wrong range on write()
      fix a kmap leak in virtio_console

Diffstat:
 drivers/char/virtio_console.c |    9 +++------
 fs/cifs/file.c                |    4 ++--
 fs/ext4/file.c                |    2 +-
 fs/ntfs/file.c                |    2 +-
 fs/sync.c                     |   17 -----------------
 fs/xfs/xfs_file.c             |    2 +-
 include/linux/fs.h            |    8 +++++++-
 mm/filemap.c                  |    4 ++--
 8 files changed, 17 insertions(+), 31 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [git pull] vfs.git fixes for -rc2
  2014-02-09 23:36 [git pull] vfs.git fixes for -rc2 Al Viro
@ 2014-02-10 10:47 ` Dave Chinner
  2014-02-10 10:52   ` Christoph Hellwig
  2014-02-10 11:17   ` Al Viro
  0 siblings, 2 replies; 7+ messages in thread
From: Dave Chinner @ 2014-02-10 10:47 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel, linux-fsdevel

On Sun, Feb 09, 2014 at 11:36:43PM +0000, Al Viro wrote:
> 	A couple of fixes, both -stable fodder.  O_SYNC bug is
> fairly old...  Please, pull from the usual place -
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus
> 
> Shortlog:
> Al Viro (2):
>       fix O_SYNC|O_APPEND syncing the wrong range on write()

As i pointed out in a private thread this doesn't fix XFS. It passes
a private "pos" variable to generic_write_checks() and so
iocb->ki_pos never gets updated to point at the new EOF when
O_APPEND is set. Hence the code inthe above commit is still syncing
the wrong range.

Indeed, I think that __generic_file_aio_write has the same problem.
It gets called from generic_file_aio_write() like so:

	ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);

And __generic_file_aio_write() does this:

	pos = *ppos;
	....
	err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode));

and the updated pos value on O_APPEND writes is never folded back
into ppos. Hence the later call to generic_write_sync() still has
the wrong range....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [git pull] vfs.git fixes for -rc2
  2014-02-10 10:47 ` Dave Chinner
@ 2014-02-10 10:52   ` Christoph Hellwig
  2014-02-10 11:16     ` Geert Uytterhoeven
  2014-02-10 11:17     ` Dave Chinner
  2014-02-10 11:17   ` Al Viro
  1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2014-02-10 10:52 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Al Viro, Linus Torvalds, linux-kernel, linux-fsdevel

On Mon, Feb 10, 2014 at 09:47:47PM +1100, Dave Chinner wrote:
> As i pointed out in a private thread this doesn't fix XFS.

Btw, would be nice to have a public discussion and review next time
before a pull request appears.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [git pull] vfs.git fixes for -rc2
  2014-02-10 10:52   ` Christoph Hellwig
@ 2014-02-10 11:16     ` Geert Uytterhoeven
  2014-02-10 11:17     ` Dave Chinner
  1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-02-10 11:16 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Dave Chinner, Al Viro, Linus Torvalds,
	linux-kernel@vger.kernel.org, Linux FS Devel

On Mon, Feb 10, 2014 at 11:52 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Feb 10, 2014 at 09:47:47PM +1100, Dave Chinner wrote:
>> As i pointed out in a private thread this doesn't fix XFS.
>
> Btw, would be nice to have a public discussion and review next time
> before a pull request appears.

And after review, it can be added to linux-next.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [git pull] vfs.git fixes for -rc2
  2014-02-10 10:52   ` Christoph Hellwig
  2014-02-10 11:16     ` Geert Uytterhoeven
@ 2014-02-10 11:17     ` Dave Chinner
  1 sibling, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2014-02-10 11:17 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Al Viro, Linus Torvalds, linux-kernel, linux-fsdevel

On Mon, Feb 10, 2014 at 02:52:10AM -0800, Christoph Hellwig wrote:
> On Mon, Feb 10, 2014 at 09:47:47PM +1100, Dave Chinner wrote:
> > As i pointed out in a private thread this doesn't fix XFS.
> 
> Btw, would be nice to have a public discussion and review next time
> before a pull request appears.

The private thread was Al pointing out other O_APPEND related
problems in a reply to his pull request, so you haven't missed out
on anything. First I knew of this was that private thread....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [git pull] vfs.git fixes for -rc2
  2014-02-10 10:47 ` Dave Chinner
  2014-02-10 10:52   ` Christoph Hellwig
@ 2014-02-10 11:17   ` Al Viro
  1 sibling, 0 replies; 7+ messages in thread
From: Al Viro @ 2014-02-10 11:17 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Linus Torvalds, linux-kernel, linux-fsdevel

On Mon, Feb 10, 2014 at 09:47:47PM +1100, Dave Chinner wrote:

> and the updated pos value on O_APPEND writes is never folded back
> into ppos.

Not true.  Check generic_file_buffered_write() and generic_file_direct_write()
- that's where it's normally stored into iocb->ki_pos (via *ppos).  And yes,
I agree that the damn thing is obfuscated to hell and back - other commits
in my local tree kill 'ppos' arguments of __generic_file_aio_write() and
generic_file_buffered_write() (equal to &iocb->ki_pos for all call sites),
which makes it a bit easier to keep track of.  Will push that part of
queue into vfs.git#iov_iter today...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [git pull] vfs.git fixes for -rc2
@ 2015-07-12 16:16 Al Viro
  0 siblings, 0 replies; 7+ messages in thread
From: Al Viro @ 2015-07-12 16:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-fsdevel

	Fixes for this cycle regression in overlayfs and a couple of
long-standing (== all the way back to 2.6.12, at least) bugs.  Please,
pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus

Shortlog:
Al Viro (3):
      9p: don't leave a half-initialized inode sitting around
      fix a braino in ovl_d_select_inode()
      freeing unlinked file indefinitely delayed

Diffstat:
 fs/9p/vfs_inode.c      | 3 +--
 fs/9p/vfs_inode_dotl.c | 3 +--
 fs/dcache.c            | 7 +++++--
 fs/overlayfs/inode.c   | 3 +++
 4 files changed, 10 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-12 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-09 23:36 [git pull] vfs.git fixes for -rc2 Al Viro
2014-02-10 10:47 ` Dave Chinner
2014-02-10 10:52   ` Christoph Hellwig
2014-02-10 11:16     ` Geert Uytterhoeven
2014-02-10 11:17     ` Dave Chinner
2014-02-10 11:17   ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2015-07-12 16:16 Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).