configfs cleanups and fixes
Status from this message: has been merged into torvalds/linux.git:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest18 patches 11 repliesMerged
- v1 RFC14 patches 20 repliesSuperseded
Patches in v2 Merged
Reviews trailers per patch
All 18 patches have a Reviewed-by or Acked-by.
| Patch | Jan Kara | Breno Leitao |
|---|---|---|
| 1/18 | R-b | R-b |
| 2/18 | R-b | |
| 3/18 | R-b | R-b |
| 4/18 | R-b | R-b |
| 5/18 | R-b | R-b |
| 6/18 | R-b | |
| 7/18 | R-b | |
| 8/18 | R-b | |
| 9/18 | R-b | |
| 10/18 | R-b | |
| 11/18 | R-b | |
| 12/18 | R-b | |
| 13/18 | R-b | |
| 14/18 | R-b | |
| 15/18 | R-b | |
| 16/18 | R-b | |
| 17/18 | R-b | |
| 18/18 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/18] configfs cleanups and fixes
Updated and rebased to -rc6; changes since v1:
* added a fix for races between lseek() and directory removals; had been there since 2008. If we use list_for_each_entry_safe(), we need to make sure that the next object won't get moved around and/or removed while we are in the loop body; holding the directory locked is enough to make sure that another thread won't add/remove stuff to that directory, but it does *not* prevent cursors being moved around. So when lseek() for those switched to global spinlock for list protection, all places that relies upon the directory lock alone for list traversals needed to be modified...
Fixes (configfs_lookup()-triggered UAF and this one) are in
the beginning of the queue; that's #fixes-configfs and the rest is on top of those.
* fixed braindamage in "kill configfs_drop_dentry()" (used to be #13, now #14).
* added several "correct the argument types" patches - removing never unused arguments for configfs_attach_{group,item}() and converting create_default_group() from parent's config_group to parent's dentry.
This branch (7.1-rc6-based) lives ingit://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.configfs Individual patches in followups. It still needs more testing...
Review and testing would be very welcome.
I've also pushed tentative followups out into #more.configfs, but those definitely will miss the coming merge window. Will post separately...
Al Viro (18):
configfs_lookup(): don't leave ->s_dentry dangling on failure
configfs: fix lockless traversals of ->s_children configfs_mkdir(): use take_dentry_name_snapshot() configfs_detach_prep(): pass configfs_dirent instead of dentry configfs_depend_prep(): pass configfs_dirent instead of dentry configfs_do_depend_item(): pass configfs_dirent instead of dentry configfs_detach_rollback(): pass configfs_dirent instead of dentry populate_group(): move cleanup on failure to the sole caller populate_attrs(): move cleanup to the sole caller configfs_remove_dir(), detach_attrs(): switch to passing dentry switch configfs_detach_{group,item}() to passing dentry
configfs: dentry refcount needs to be pinned only once
configfs: mark pinned dentries persistent
kill configfs_drop_dentry()
configfs_create(): lift parent timestamp updates into callers configs_attach_item(): drop unused parent_item argument configfs_attach_group(): drop the unused parent_item argument create_default_group(): pass parent's dentry instead of config_group
fs/configfs/configfs_internal.h | 1 - fs/configfs/dir.c | 315 ++++++++++++++++---------------- fs/configfs/inode.c | 25 --- fs/configfs/symlink.c | 3 +- 4 files changed, 157 insertions(+), 187 deletions(-)
Signature · 1 line
2.47.3