freebsd-dev/sys/ufs/ffs
Konstantin Belousov c999b43527 Generalize the fix from r322757 and apply it to several more places.
The code accesses bp->b_dep without owning the ufs mount softdep lock,
which makes it possible for the derefenced workitem to be freed in
parallel.  In particular, the deallocate_dependencies(),
softdep_disk_io_initiation() and softdep_disk_write_complete() are
affected.

Move the code to safely calculate ump from the buffer with
dependencies into the helper softdep_bp_to_mp() and use it for all
found cases.

Tested by:	pho (as part of the bigger patch)
Reviewed by:	mckusick (as part of the bigger patch)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2018-01-09 10:51:44 +00:00
..
ffs_alloc.c SPDX: Complete License ID tags for UFS. 2017-12-27 19:13:50 +00:00
ffs_balloc.c SPDX: Complete License ID tags for UFS. 2017-12-27 19:13:50 +00:00
ffs_extern.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_inode.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_rawread.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ffs_snapshot.c Remove dead initialization of the inode pointer. 2017-12-23 16:24:02 +00:00
ffs_softdep.c Generalize the fix from r322757 and apply it to several more places. 2018-01-09 10:51:44 +00:00
ffs_subr.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_suspend.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ffs_tables.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_vfsops.c Postpone the disassotiation of the background write buffer with devvp 2018-01-09 10:33:11 +00:00
ffs_vnops.c SPDX: Complete License ID tags for UFS. 2017-12-27 19:13:50 +00:00
fs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
softdep.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00