mirror_zfs/include/sys
Oleg Drokin 98cdcb8286 Remove misguided HAVE_MUTEX_OWNER check, take 2
It is just plain unsafe to peek inside in-kernel
mutex structure and make assumptions about what kernel
does with those internal fields like owner.

Kernel is all too happy to stop doing the expected things
like tracing lock owner once you load a tainted module
like spl/zfs that is not GPL.

As such you will get instant assertion failures like this:

  VERIFY3(((*(volatile typeof((&((&zo->zo_lock)->m_mutex))->owner) *)&
      ((&((&zo->zo_lock)->m_mutex))->owner))) ==
     ((void *)0)) failed (ffff88030be28500 == (null))
  PANIC at zfs_onexit.c:104:zfs_onexit_destroy()
  Showing stack for process 3626
  CPU: 0 PID: 3626 Comm: mkfs.lustre Tainted: P OE ------------ 3.10.0-debug #1
  Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
  Call Trace:
  dump_stack+0x19/0x1b
  spl_dumpstack+0x44/0x50 [spl]
  spl_panic+0xbf/0xf0 [spl]
  zfs_onexit_destroy+0x17c/0x280 [zfs]
  zfsdev_release+0x48/0xd0 [zfs]

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Closes #639
Closes #632
2017-08-02 20:50:27 -07:00
..
fm Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
fs Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
sysevent Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
acl_impl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
acl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
atomic.h Remove atomic64_xchg() wrappers 2014-10-17 15:11:50 -07:00
attr.h Refresh links to web site 2013-03-04 19:09:34 -08:00
bitmap.h Refresh links to web site 2013-03-04 19:09:34 -08:00
bootconf.h Refresh links to web site 2013-03-04 19:09:34 -08:00
bootprops.h Refresh links to web site 2013-03-04 19:09:34 -08:00
buf.h Refresh links to web site 2013-03-04 19:09:34 -08:00
byteorder.h Changes to support zfs encryption 2016-02-25 11:42:46 -08:00
callb.h Refresh links to web site 2013-03-04 19:09:34 -08:00
callo.h Emulate illumos interface cv_timedwait_hires() 2013-11-04 09:49:24 -08:00
cmn_err.h Refresh links to web site 2013-03-04 19:09:34 -08:00
compress.h Refresh links to web site 2013-03-04 19:09:34 -08:00
condvar.h Linux 4.13 compat: wait queues 2017-07-23 19:32:14 -07:00
conf.h Refresh links to web site 2013-03-04 19:09:34 -08:00
console.h Refresh links to web site 2013-03-04 19:09:34 -08:00
cpupart.h Refresh links to web site 2013-03-04 19:09:34 -08:00
cpuvar.h Refresh links to web site 2013-03-04 19:09:34 -08:00
crc32.h Refresh links to web site 2013-03-04 19:09:34 -08:00
cred.h Linux 4.9 compat: group_info changes 2016-10-20 09:33:28 -07:00
ctype.h Refresh links to web site 2013-03-04 19:09:34 -08:00
ddi.h Refresh links to web site 2013-03-04 19:09:34 -08:00
debug.h Add ASSERT3B/VERIFY3B/USEC2NSEC/NSEC2USEC macros 2017-07-13 13:19:15 -04:00
dirent.h Refresh links to web site 2013-03-04 19:09:34 -08:00
disp.h Add kpreempt() compatibility macro 2013-10-09 13:52:55 -07:00
dkio.h Additional dkio support for TRIM/Discard 2015-12-02 13:44:35 -08:00
dkioc_free_util.h Use vmem_free() in dfl_free() and add dfl_alloc() 2016-04-26 11:20:14 -07:00
dklabel.h Refresh links to web site 2013-03-04 19:09:34 -08:00
dnlc.h Remove shrink_{i,d}node_cache() wrappers 2014-10-17 15:11:51 -07:00
dumphdr.h Refresh links to web site 2013-03-04 19:09:34 -08:00
efi_partition.h Refresh links to web site 2013-03-04 19:09:34 -08:00
errno.h Refresh links to web site 2013-03-04 19:09:34 -08:00
extdirent.h Refresh links to web site 2013-03-04 19:09:34 -08:00
fcntl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
file.h Refresh links to web site 2013-03-04 19:09:34 -08:00
idmap.h Refresh links to web site 2013-03-04 19:09:34 -08:00
int_limits.h Refresh links to web site 2013-03-04 19:09:34 -08:00
int_types.h Refresh links to web site 2013-03-04 19:09:34 -08:00
inttypes.h Refresh links to web site 2013-03-04 19:09:34 -08:00
isa_defs.h Add _ALIGNMENT_REQUIRED to isa_defs.h for checksums 2016-06-21 13:37:04 -07:00
kidmap.h Refresh links to web site 2013-03-04 19:09:34 -08:00
kmem_cache.h Linux 4.13 compat: wait queues 2017-07-23 19:32:14 -07:00
kmem.h Linux 4.12 compat: PF_FSTRANS was removed 2017-05-09 10:36:54 -07:00
kobj.h kobj_read_file: Return -1 on vn_rdwr() error 2016-01-23 10:10:44 -08:00
kstat.h 3537 add kstat_waitq_enter and friends 2013-10-25 13:41:52 -07:00
list.h Refresh links to web site 2013-03-04 19:09:34 -08:00
Makefile.am Additional dkio support for TRIM/Discard 2015-12-02 13:44:35 -08:00
mkdev.h Refresh links to web site 2013-03-04 19:09:34 -08:00
mntent.h Refresh links to web site 2013-03-04 19:09:34 -08:00
modctl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
mode.h Refresh links to web site 2013-03-04 19:09:34 -08:00
mount.h Refresh links to web site 2013-03-04 19:09:34 -08:00
mutex.h Remove misguided HAVE_MUTEX_OWNER check, take 2 2017-08-02 20:50:27 -07:00
note.h Refresh links to web site 2013-03-04 19:09:34 -08:00
open.h Refresh links to web site 2013-03-04 19:09:34 -08:00
param.h Refresh links to web site 2013-03-04 19:09:34 -08:00
pathname.h Refresh links to web site 2013-03-04 19:09:34 -08:00
policy.h Refresh links to web site 2013-03-04 19:09:34 -08:00
pool.h Refresh links to web site 2013-03-04 19:09:34 -08:00
priv_impl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
proc.h Refresh links to web site 2013-03-04 19:09:34 -08:00
processor.h Refresh links to web site 2013-03-04 19:09:34 -08:00
pset.h Refresh links to web site 2013-03-04 19:09:34 -08:00
random.h random_get_pseudo_bytes() need not provide cryptographic strength entropy 2016-02-17 09:49:09 -08:00
refstr.h Refresh links to web site 2013-03-04 19:09:34 -08:00
resource.h Refresh links to web site 2013-03-04 19:09:34 -08:00
rwlock.h Remove stale comment from rw_tryupgrade() 2016-12-19 11:27:27 -08:00
sdt.h Define SET_ERROR() 2013-10-09 14:20:46 -07:00
sid.h Refresh links to web site 2013-03-04 19:09:34 -08:00
signal.h Linux 4.11 compat: add linux/sched/signal.h 2017-03-20 17:43:43 -07:00
stat.h Refresh links to web site 2013-03-04 19:09:34 -08:00
stropts.h Refresh links to web site 2013-03-04 19:09:34 -08:00
sunddi.h Update code to use misc_register()/misc_deregister() 2014-10-17 15:07:28 -07:00
sunldi.h Changes to support zfs encryption 2016-02-25 11:42:46 -08:00
sysdc.h Refresh links to web site 2013-03-04 19:09:34 -08:00
sysevent.h Refresh links to web site 2013-03-04 19:09:34 -08:00
sysmacros.h Add a PAGESHIFT definition 2017-01-31 10:36:18 -08:00
systeminfo.h Simplify hostid logic 2014-04-14 09:04:41 -07:00
systm.h Refresh links to web site 2013-03-04 19:09:34 -08:00
t_lock.h Refresh links to web site 2013-03-04 19:09:34 -08:00
taskq.h Linux 4.13 compat: wait queues 2017-07-23 19:32:14 -07:00
thread.h De-inline spl_kthread_create(). 2014-04-09 19:17:12 -07:00
time.h Add ASSERT3B/VERIFY3B/USEC2NSEC/NSEC2USEC macros 2017-07-13 13:19:15 -04:00
timer.h Add ddi_time_after and friends 2014-04-14 09:32:01 -07:00
tsd.h Use tsd to store tq for taskq_member 2016-01-20 13:07:45 -08:00
types32.h Refresh links to web site 2013-03-04 19:09:34 -08:00
types.h Linux 4.5 compat: pfn_t typedef 2016-01-20 11:39:18 -08:00
u8_textprep.h Refresh links to web site 2013-03-04 19:09:34 -08:00
uio.h Restructure uio to accommodate bio_vec 2015-08-24 10:10:21 -07:00
unistd.h Refresh links to web site 2013-03-04 19:09:34 -08:00
user.h Fix race between getf() and areleasef() 2015-12-03 15:44:47 -08:00
va_list.h Refresh links to web site 2013-03-04 19:09:34 -08:00
varargs.h Refresh links to web site 2013-03-04 19:09:34 -08:00
vfs_opreg.h Refresh links to web site 2013-03-04 19:09:34 -08:00
vfs.h Refresh links to web site 2013-03-04 19:09:34 -08:00
vmem.h Use spl_fstrans_mark instead of memalloc_noio_save 2015-12-18 13:24:52 -08:00
vmsystm.h Include other sources of freeable memory in the freemem calculation 2015-08-19 09:25:30 -07:00
vnode.h Implement areleasef() 2015-04-24 13:02:37 -07:00
zmod.h Refresh links to web site 2013-03-04 19:09:34 -08:00
zone.h Add crgetzoneid() stub 2015-04-02 09:49:55 -07:00