svn commit: r319778 - in stable/11/sys: kern ufs/ffs
Konstantin Belousov
kib at FreeBSD.org
Sat Jun 10 11:14:56 UTC 2017
Author: kib
Date: Sat Jun 10 11:14:54 2017
New Revision: 319778
URL: https://svnweb.freebsd.org/changeset/base/319778
Log:
MFC r319518:
Ensure that cached struct thread does not keep spurious td_su
reference on an UFS mount point.
MFC r319519:
Clean possible td_su reference on the struct mount being unmounted as
the last step of ffs_unmount().
Approved by: re (gjb)
Modified:
stable/11/sys/kern/kern_proc.c
stable/11/sys/ufs/ffs/ffs_vfsops.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/kern_proc.c
==============================================================================
--- stable/11/sys/kern/kern_proc.c Sat Jun 10 10:40:15 2017 (r319777)
+++ stable/11/sys/kern/kern_proc.c Sat Jun 10 11:14:54 2017 (r319778)
@@ -226,6 +226,8 @@ proc_dtor(void *mem, int size, void *arg)
#endif
/* Free all OSD associated to this thread. */
osd_thread_exit(td);
+ td_softdep_cleanup(td);
+ MPASS(td->td_su == NULL);
/* Make sure all thread destructors are executed */
EVENTHANDLER_INVOKE(thread_dtor, td);
Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/11/sys/ufs/ffs/ffs_vfsops.c Sat Jun 10 10:40:15 2017 (r319777)
+++ stable/11/sys/ufs/ffs/ffs_vfsops.c Sat Jun 10 11:14:54 2017 (r319778)
@@ -1317,6 +1317,10 @@ ffs_unmount(mp, mntflags)
MNT_ILOCK(mp);
mp->mnt_flag &= ~MNT_LOCAL;
MNT_IUNLOCK(mp);
+ if (td->td_su == mp) {
+ td->td_su = NULL;
+ vfs_rel(mp);
+ }
return (error);
fail:
More information about the svn-src-stable
mailing list