Files
mirror_zfs/include/sys
Chunwei Chen 07012da668 Fix kernel panic due to tsd_exit in ZFS_EXIT(zsb)
The following panic would occur under certain heavy load:
[ 4692.202686] Kernel panic - not syncing: thread ffff8800c4f5dd60 terminating with rrw lock ffff8800da1b9c40 held
[ 4692.228053] CPU: 1 PID: 6250 Comm: mmap_deadlock Tainted: P           OE  3.18.10 #7

The culprit is that ZFS_EXIT(zsb) would call tsd_exit() every time, which
would purge all tsd data for the thread. However, ZFS_ENTER is designed to be
reentrant, so we cannot allow ZFS_EXIT to blindly purge tsd data.

Instead, we rely on the new behavior of tsd_set. When NULL is passed as the
new value to tsd_set, it will automatically remove the tsd entry specified the
the key for the current thread.

rrw_tsd_key and zfs_allow_log_key already calls tsd_set(key, NULL) when
they're done. The zfs_fsyncer_key relied on ZFS_EXIT(zsb) to call tsd_exit() to
do clean up. Now we explicitly call tsd_set(key, NULL) on them.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3247
2015-04-24 14:57:54 -07:00
..
2014-08-01 14:28:05 -07:00
2013-01-08 10:35:43 -08:00
2015-01-16 14:41:26 -08:00
2014-01-07 10:33:11 -08:00
2014-08-01 14:28:05 -07:00
2014-08-01 14:28:05 -07:00
2014-03-04 12:22:24 -08:00
2013-12-10 10:09:27 -08:00
2014-07-29 10:55:29 -07:00
2015-01-16 14:41:26 -08:00
2014-07-29 10:55:29 -07:00
2013-11-04 11:18:14 -08:00
2015-01-16 14:41:26 -08:00
2013-09-04 16:01:24 -07:00
2013-09-04 16:01:24 -07:00
2013-11-04 11:17:48 -08:00
2014-08-13 10:35:00 -07:00
2014-07-30 09:20:35 -07:00
2013-09-04 16:01:24 -07:00
2013-09-04 16:01:24 -07:00
2015-01-16 14:41:28 -08:00
2015-01-06 16:53:24 -08:00
2011-02-10 09:21:43 -08:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2014-07-28 14:29:58 -07:00
2011-03-02 11:43:50 -08:00
2013-11-04 10:55:25 -08:00
2014-07-25 16:40:07 -07:00
2014-07-28 14:29:58 -07:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2011-02-10 09:27:21 -08:00
2014-08-01 14:28:05 -07:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2014-08-11 16:11:43 -07:00
2013-12-18 16:46:35 -08:00
2014-11-14 14:39:43 -08:00
2013-11-04 10:55:25 -08:00
2013-11-05 12:14:56 -08:00
2015-01-16 14:41:28 -08:00
2015-03-20 10:35:20 -07:00
2013-12-16 09:15:57 -08:00