linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] atomic open related fixes
@ 2013-09-16 12:51 Miklos Szeredi
  2013-09-16 12:51 ` [PATCH 01/11] vfs: improve i_op->atomic_open() documentation Miklos Szeredi
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Miklos Szeredi @ 2013-09-16 12:51 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, mszeredi

Found an atomic open related fix in the 9p tree (b6f4bee02f); tured out, it
didn't fully fix 9p and introduced another bug in the process and also several
other filesystems are affected by the same bug.  Then I reviewed all the atomic
open implementations and found more bugs.  This series tries to address these.

Only tested the fuse fix, the others are compile tested only.

One issue that crops up several times, and which is not strictly related to
atomic open, is that a non-NULL return value of d_splice_alias() (or ->lookup(),
etc..)  are not handled properly by filesystems.  The reason for this is that a
non-NULL return gets very little testing (only if exported and even then not
easy to trigger).  There should be some way to more easily expose such bugs or
improve the API so that these bugs are harder to introduce.

Thanks,
Miklos

---
Miklos Szeredi (11):
      vfs: improve i_op->atomic_open() documentation
      9p: fix dentry leak in v9fs_vfs_atomic_open_dotl()
      9p: fix O_EXCL in v9fs_vfs_atomic_open()
      fuse: fix O_EXCL in fuse_atomic_open()
      cifs: fix filp leak in cifs_atomic_open()
      gfs2: d_splice_alias() cant return error
      gfs2: pass correct dentry to finish_open() in __gfs2_lookup()
      gfs2: fix dentry leaks
      gfs2: set FILE_CREATED
      nfs: set FILE_CREATED
      vfs: don't set FILE_CREATED before calling ->atomic_open()

---
 Documentation/filesystems/vfs.txt | 14 +++++++-------
 fs/9p/vfs_inode.c                 |  9 ++++++++-
 fs/9p/vfs_inode_dotl.c            |  9 +++++----
 fs/cifs/dir.c                     |  1 +
 fs/fuse/dir.c                     | 10 +++++++++-
 fs/gfs2/inode.c                   | 40 ++++++++++++++++++++++-----------------
 fs/namei.c                        | 11 ++++++++---
 fs/nfs/dir.c                      |  3 +++
 fs/open.c                         | 21 +++++++++++++++++---
 9 files changed, 82 insertions(+), 36 deletions(-)


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

end of thread, other threads:[~2013-09-18 15:22 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 12:51 [PATCH 00/11] atomic open related fixes Miklos Szeredi
2013-09-16 12:51 ` [PATCH 01/11] vfs: improve i_op->atomic_open() documentation Miklos Szeredi
2013-09-16 12:51 ` [PATCH 02/11] 9p: fix dentry leak in v9fs_vfs_atomic_open_dotl() Miklos Szeredi
2013-09-16 18:19   ` Al Viro
2013-09-16 19:03     ` Miklos Szeredi
2013-09-16 19:50       ` Al Viro
2013-09-16 20:09         ` Miklos Szeredi
2013-09-16 22:02           ` Al Viro
2013-09-16 23:28             ` Al Viro
2013-09-17 10:16               ` Miklos Szeredi
2013-09-17 11:44                 ` Al Viro
2013-09-17 15:36                   ` Miklos Szeredi
2013-09-17 21:23                     ` Al Viro
2013-09-18  8:55                       ` Miklos Szeredi
2013-09-16 12:51 ` [PATCH 03/11] 9p: fix O_EXCL in v9fs_vfs_atomic_open() Miklos Szeredi
2013-09-16 12:51 ` [PATCH 04/11] fuse: fix O_EXCL in fuse_atomic_open() Miklos Szeredi
2013-09-16 12:51 ` [PATCH 05/11] cifs: fix filp leak in cifs_atomic_open() Miklos Szeredi
2013-09-18 15:19   ` Steve French
2013-09-18 15:22     ` Al Viro
2013-09-16 12:52 ` [PATCH 06/11] gfs2: d_splice_alias() cant return error Miklos Szeredi
2013-09-16 13:17   ` Steven Whitehouse
2013-09-16 13:35     ` Miklos Szeredi
2013-09-16 13:56       ` Steven Whitehouse
2013-09-16 12:52 ` [PATCH 07/11] gfs2: pass correct dentry to finish_open() in __gfs2_lookup() Miklos Szeredi
2013-09-16 13:13   ` Steven Whitehouse
2013-09-16 13:34     ` Miklos Szeredi
2013-09-16 13:54       ` Steven Whitehouse
2013-09-16 12:52 ` [PATCH 08/11] gfs2: fix dentry leaks Miklos Szeredi
2013-09-16 12:52 ` [PATCH 09/11] gfs2: set FILE_CREATED Miklos Szeredi
2013-09-16 13:27   ` Steven Whitehouse
2013-09-16 12:52 ` [PATCH 10/11] nfs: " Miklos Szeredi
2013-09-16 12:52 ` [PATCH 11/11] vfs: don't set FILE_CREATED before calling ->atomic_open() Miklos Szeredi

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