linux-stable/fs/dlm
tsutomu.owa@toshiba.co.jp f0fb83cb92 DLM: fix double list_del()
dlm_lowcomms_stop() was not functioning properly. Correctly, we have to
wait until all processing is finished with send_workqueue and
recv_workqueue.
This problem causes the following issue. Senario is

1. dlm_send thread:
    send_to_sock refers con->writequeue
2. main thread:
    dlm_lowcomms_stop calls list_del
3. dlm_send thread:
    send_to_sock calls list_del in writequeue_entry_complete

[ 1925.770305] dlm: canceled swork for node 4
[ 1925.772374] general protection fault: 0000 [#1] SMP
[ 1925.777930] Modules linked in: ocfs2_stack_user ocfs2 ocfs2_nodemanager ocfs2_stackglue dlm fmxnet(O) fmx_api(O) fmx_cu(O) igb(O) kvm_intel kvm irqbypass autofs4
[ 1925.794131] CPU: 3 PID: 6994 Comm: kworker/u8:0 Tainted: G           O    4.4.39 #1
[ 1925.802684] Hardware name: TOSHIBA OX/OX, BIOS OX-P0015 12/03/2015
[ 1925.809595] Workqueue: dlm_send process_send_sockets [dlm]
[ 1925.815714] task: ffff8804398d3c00 ti: ffff88046910c000 task.ti: ffff88046910c000
[ 1925.824072] RIP: 0010:[<ffffffffa04bd158>]  [<ffffffffa04bd158>] process_send_sockets+0xf8/0x280 [dlm]
[ 1925.834480] RSP: 0018:ffff88046910fde0  EFLAGS: 00010246
[ 1925.840411] RAX: dead000000000200 RBX: 0000000000000001 RCX: 000000000000000a
[ 1925.848372] RDX: ffff88046bd980c0 RSI: 0000000000000000 RDI: ffff8804673c5670
[ 1925.856341] RBP: ffff88046910fe20 R08: 00000000000000c9 R09: 0000000000000010
[ 1925.864311] R10: ffffffff81e22fc0 R11: 0000000000000000 R12: ffff8804673c56d8
[ 1925.872281] R13: ffff8804673c5660 R14: ffff88046bd98440 R15: 0000000000000058
[ 1925.880251] FS:  0000000000000000(0000) GS:ffff88047fd80000(0000) knlGS:0000000000000000
[ 1925.889280] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1925.895694] CR2: 00007fff09eadf58 CR3: 00000004690f5000 CR4: 00000000001006e0
[ 1925.903663] Stack:
[ 1925.905903]  ffff8804673c5630 ffff8804673c5620 ffff8804673c5670 ffff88007d219b40
[ 1925.914181]  ffff88046f095800 0000000000000100 ffff8800717a1400 ffff8804673c56d8
[ 1925.922459]  ffff88046910fe60 ffffffff81073db2 00ff880400000000 ffff88007d219b40
[ 1925.930736] Call Trace:
[ 1925.933468]  [<ffffffff81073db2>] process_one_work+0x162/0x450
[ 1925.939983]  [<ffffffff81074459>] worker_thread+0x69/0x4a0
[ 1925.946109]  [<ffffffff810743f0>] ? rescuer_thread+0x350/0x350
[ 1925.952622]  [<ffffffff8107956f>] kthread+0xef/0x110
[ 1925.958165]  [<ffffffff81079480>] ? kthread_park+0x60/0x60
[ 1925.964283]  [<ffffffff8186ab2f>] ret_from_fork+0x3f/0x70
[ 1925.970312]  [<ffffffff81079480>] ? kthread_park+0x60/0x60
[ 1925.976436] Code: 01 00 00 48 8b 7d d0 e8 07 d3 3a e1 45 01 7e 18 45 29 7e 1c 75 ab 41 8b 46 24 85 c0 75 a3 49 8b 16 49 8b 46 08 31 f6 48 89 42 08 <48> 89 10 48 b8 00 01 00 00 00 00 ad de 49 8b 7e 10 49 89 06 66
[ 1925.997791] RIP  [<ffffffffa04bd158>] process_send_sockets+0xf8/0x280 [dlm]
[ 1926.005577]  RSP <ffff88046910fde0>

Signed-off-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
Signed-off-by: David Teigland <teigland@redhat.com>
2017-09-25 12:45:21 -05:00
..
ast.c dlm: don't specify WQ_UNBOUND for the ast callback workqueue 2016-10-19 11:13:04 -05:00
ast.h dlm: use workqueue for callbacks 2011-07-15 12:30:43 -05:00
config.c dlm: audit and remove any unnecessary uses of module.h 2016-10-19 11:00:03 -05:00
config.h dlm: add log_info config option 2016-06-21 09:04:24 -05:00
debug_fs.c dlm: Improve a size determination in table_seq_start() 2017-08-07 11:23:09 -05:00
dir.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
dir.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
dlm_internal.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
Kconfig fs/dlm: remove CONFIG_EXPERIMENTAL 2012-11-01 15:27:24 -05:00
lock.c dlm: Delete an error message for a failed memory allocation in dlm_recover_waiters_pre() 2017-08-07 11:23:09 -05:00
lock.h dlm: adopt orphan locks 2014-11-19 14:48:02 -06:00
lockspace.c dlm: constify kset_uevent_ops structure 2017-08-07 11:23:09 -05:00
lockspace.h
lowcomms.c DLM: fix double list_del() 2017-09-25 12:45:21 -05:00
lowcomms.h dlm: fix deadlock between dlm_send and dlm_controld 2012-08-08 11:33:35 -05:00
lvb_table.h
main.c dlm: audit and remove any unnecessary uses of module.h 2016-10-19 11:00:03 -05:00
Makefile
member.c dlm: Delete an unnecessary variable initialisation in dlm_ls_start() 2017-08-07 11:23:09 -05:00
member.h dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
memory.c dlm: NULL dereference on failure in kmem_cache_create() 2012-05-15 10:39:28 -05:00
memory.h dlm: improve rsb searches 2011-07-12 16:02:09 -05:00
midcomms.c
midcomms.h
netlink.c dlm for 4.10 2016-12-14 08:31:37 -08:00
plock.c fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks 2017-07-16 10:28:22 -04:00
rcom.c dlm: fix missing endian conversion of rcom_status flags 2014-10-14 15:11:48 -05:00
rcom.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
recover.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
recover.h dlm: use rsbtbl as resource directory 2012-07-16 14:16:19 -05:00
recoverd.c dlm: use INFO for recovery messages 2014-02-14 11:54:44 -06:00
recoverd.h dlm: fix unlock balance warnings 2012-08-08 11:33:49 -05:00
requestqueue.c dlm: fixes for nodir mode 2012-05-02 14:15:27 -05:00
requestqueue.h
user.c dlm: avoid double-free on error path in dlm_device_{register,unregister} 2017-08-07 11:23:09 -05:00
user.h
util.c
util.h