--- - branch: netbsd-10 date: Thu Apr 18 18:22:10 UTC 2024 files: - new: 1.541.2.1 old: '1.541' path: src/sys/kern/init_main.c pathrev: src/sys/kern/init_main.c@1.541.2.1 type: modified - new: 1.14.2.1 old: '1.14' path: src/sys/kern/kern_hook.c pathrev: src/sys/kern/kern_hook.c@1.14.2.1 type: modified - new: 1.101.2.1 old: '1.101' path: src/sys/kern/vfs_mount.c pathrev: src/sys/kern/vfs_mount.c@1.101.2.1 type: modified - new: 1.82.4.1 old: '1.82' path: src/sys/miscfs/procfs/procfs.h pathrev: src/sys/miscfs/procfs/procfs.h@1.82.4.1 type: modified - new: 1.116.20.1 old: '1.116' path: src/sys/miscfs/procfs/procfs_subr.c pathrev: src/sys/miscfs/procfs/procfs_subr.c@1.116.20.1 type: modified - new: 1.111.4.1 old: '1.111' path: src/sys/miscfs/procfs/procfs_vfsops.c pathrev: src/sys/miscfs/procfs/procfs_vfsops.c@1.111.4.1 type: modified - new: 1.229.4.1 old: '1.229' path: src/sys/miscfs/procfs/procfs_vnops.c pathrev: src/sys/miscfs/procfs/procfs_vnops.c@1.229.4.1 type: modified id: 20240418T182210Z.7b2be09be7b9f01e1e5211cf2ca5c9be8f4e78de log: "Pull up following revision(s) (requested by hannken in ticket #668):\n\n\tsys/miscfs/procfs/procfs.h: revision 1.83\n\tsys/miscfs/procfs/procfs.h: revision 1.84\n\tsys/kern/vfs_mount.c: revision 1.104\n\tsys/miscfs/procfs/procfs_vnops.c: revision 1.230\n\tsys/kern/init_main.c: revision 1.547\n\tsys/kern/kern_hook.c: revision 1.15\n\tsys/miscfs/procfs/procfs_vfsops.c: revision 1.112\n\tsys/miscfs/procfs/procfs_vfsops.c: revision 1.113\n\tsys/miscfs/procfs/procfs_vfsops.c: revision 1.114\n\tsys/miscfs/procfs/procfs_subr.c: revision 1.117\n\nPrint dangling vnode before panic() to help debug.\n\nPR kern/57775 \"\"panic: unmount: dangling vnode\" while umounting procfs\"\nProtect kernel hooks exechook, exithook and forkhook with rwlock.\n\nLock as writer on establish/disestablish and as reader on list traverse.\n\nFor exechook ride \"exec_lock\" as it is already take as reader when\ntraversing the list. Add local locks for exithook and forkhook.\n\nMove exec_init before signal_init as signal_init calls exechook_establish()\nthat needs \"exec_lock\".\n\nPR kern/39913 \"exec, fork, exit hooks need locking\"\n\nAdd a hashmap to access all procfs nodes by pid.\n\nUsing the exechook to revoke procfs nodes is racy and may deadlock:\none thread runs doexechooks() -> procfs_revoke_vnodes() and wants to suspend\nthe file system for vgone(), while another thread runs a forced unmount,\nhas the file system suspended, tries to disestablish the exechook and\nwaits for doexechooks() to complete.\n\nEstablish/disestablish the exechook on module load/unload instead\nmount/unmount and use the hashmap to access all procfs nodes for this pid.\n\nMay fix PR kern/57775 \"\"panic: unmount: dangling vnode\" while umounting procfs\"\n\nRemove all procfs nodes for this process on process exit.\n" module: src subject: 'CVS commit: [netbsd-10] src/sys' unixtime: '1713464530' user: martin