freebsd-skq/sys
Andriy Gapon 69bac03666 MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback
illumos/illumos-gate@90f2c094b3
90f2c094b3

https://www.illumos.org/issues/7181
  zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths.
  dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup()
  before the setup is actually completed,
  thus an under-constructed zfsvfs becomes visible.
  Additionally, there is nothing to serialize the two call paths. As a result two
  threads can step on each other's toes.
  assertion failed: zilog->zl_clean_taskq == NULL, file:
  ../../common/fs/zfs/zil.c, line: 1772

  > $c
  vpanic()
  0xfffffffffbdf6928()
  zil_open+0x45(ffffff1bbc5dd000, fffffffff7993880)
  zfsvfs_setup+0x84(ffffffb378d77000, 0)
  zfs_resume_fs+0x132(ffffffb378d77000, ffffffb37ddcf000)
  zfs_ioc_rollback+0x96(ffffffb37ddcf000, ffffff01dcdc4cd0, ffffff01aa091000)
  zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368, ffffff0004b59e58)
  fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368, ffffff0004b59e58)
  ioctl+0x9b(7, 5a19, 80465f8)
  sys_syscall32+0x1f7()

  > ffffff1bbc5dd000::print objset_t os_zil
  os_zil = 0xffffff1c053cf7c0
  > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after:	2 weeks
2016-11-24 10:34:42 +00:00
..
amd64 Report page faults due to reserved bits in PTEs as a separate fault type. 2016-11-19 01:34:12 +00:00
arm Enable the SCL and SDA i2c line for DDC. 2016-11-24 01:24:26 +00:00
arm64 [rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one 2016-11-24 00:45:52 +00:00
boot Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB. 2016-11-24 06:43:11 +00:00
bsm
cam Fix "camcontrol rescan" with SATA drives behind a SAS controller 2016-11-17 20:42:56 +00:00
cddl MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback 2016-11-24 10:34:42 +00:00
compat Remove PG_CACHED-related fields from struct vmmeter, because they are no 2016-11-22 18:13:46 +00:00
conf Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access 2016-11-22 18:13:04 +00:00
contrib Merge ACPICA 20161117. 2016-11-22 05:54:37 +00:00
crypto Add accelerated AES with using the ARMv8 crypto instructions. This is based 2016-11-21 11:18:00 +00:00
ddb Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
dev firewire: initialize tag label to -1 in fw_xfer_alloc() 2016-11-24 09:47:56 +00:00
fs Release laundered vnode pages to the head of the inactive queue. 2016-11-23 17:53:07 +00:00
gdb
geom Use providergone method to cover race between destroy and g_access(). 2016-11-13 03:56:26 +00:00
gnu Add Ingenic X1000 DTS files (unofficial). 2016-11-19 15:03:49 +00:00
i386 MFamd64: Various fatal page fault fixes. 2016-11-19 01:36:44 +00:00
isa
kern cache: ensure that the number of bucket locks does not exceed hash size 2016-11-23 19:50:12 +00:00
kgssapi
libkern
mips Split MALTA board config to big and little endian versions. 2016-11-23 11:56:22 +00:00
modules r308942 broke kernel build. 2016-11-21 21:07:43 +00:00
net iflib updates and fixes: 2016-11-18 04:19:21 +00:00
net80211 [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." 2016-11-22 17:36:16 +00:00
netgraph Writing out the L2TP control packet requires 12 bytes of 2016-11-17 14:03:44 +00:00
netinet For RTT calculations mid-session, we explicitly ignore ACKs with tsecr of 0 as 2016-11-21 20:53:11 +00:00
netinet6 Make ICMPv6 hard error handling for TCP consistent with the ICMPv4 2016-10-21 10:32:57 +00:00
netipsec Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
netnatm
netpfil Remove the mbuf tag after use (for reinjected packets). 2016-11-03 00:26:58 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 2016-09-30 08:23:06 +00:00
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
pc98 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
powerpc Fix buildworld for powerpc. 2016-11-20 06:10:12 +00:00
riscv Disable superpages reservations as we don't have implemented them yet. 2016-11-21 12:00:31 +00:00
rpc
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
sys Release laundered vnode pages to the head of the inactive queue. 2016-11-23 17:53:07 +00:00
teken
tests
tools
ufs Release laundered vnode pages to the head of the inactive queue. 2016-11-23 17:53:07 +00:00
vm Release laundered vnode pages to the head of the inactive queue. 2016-11-23 17:53:07 +00:00
x86 Fix improper use of "its". 2016-11-08 23:59:41 +00:00
xdr
xen xen: add a grant-table user-space device 2016-10-31 13:12:58 +00:00
Makefile