freebsd-dev/sys/ufs/ffs
Konstantin Belousov aca4bb9112 Do not leak mount references for dying threads.
Thread might create a condition for delayed SU cleanup, which creates
a reference to the mount point in td_su, but exit without returning
through userret(), e.g. when terminating due to single-threading or
process exit.  In this case, td_su reference is not dropped and mount
point cannot be freed.

Handle the situation by clearing td_su also in the thread destructor
and in exit1().  softdep_ast_cleanup() has to receive the thread as
argument, since e.g. thread destructor is executed in different
context.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-02-25 10:38:18 +00:00
..
ffs_alloc.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
ffs_balloc.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
ffs_extern.h Partially lift suspension when ffs_reload() finished with cgs and 2016-09-08 12:01:28 +00:00
ffs_inode.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
ffs_rawread.c Reduce size of ufs inode. 2016-09-17 16:47:34 +00:00
ffs_snapshot.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
ffs_softdep.c Do not leak mount references for dying threads. 2017-02-25 10:38:18 +00:00
ffs_subr.c ANSIfy ffs_subr.c 2016-10-31 20:43:43 +00:00
ffs_suspend.c Partially lift suspension when ffs_reload() finished with cgs and 2016-09-08 12:01:28 +00:00
ffs_tables.c Include <sys/types.h> explicitly instead of depending on that 2016-10-24 18:12:57 +00:00
ffs_vfsops.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
ffs_vnops.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
fs.h prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
softdep.h Bug 211013 reports that a write error to a UFS filesystem running 2016-08-16 21:02:30 +00:00