mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
a57c9d0cee79c16f7224cddcef10e57547b42e96
This patch fixes the following lockdep warning: ====================================================== [ INFO: possible circular locking dependency detected ] 3.13.0-rc6-debug+ #5 Tainted: G W O ------------------------------------------------------- rmmod/8653 is trying to acquire lock: (scst_tgt_kref){+.+.+.}, at: [<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst] but task is already holding lock: (ft_lport_lock){+.+.+.}, at: [<ffffffffa029d3db>] ft_lport_del+0x1b/0x40 [fcst] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (ft_lport_lock){+.+.+.}: [<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0 [<ffffffff81559837>] mutex_lock_nested+0x77/0x430 [<ffffffffa029d5a0>] ft_tgt_enable+0x20/0xd0 [fcst] [<ffffffffa0335c99>] scst_process_tgt_enable_store+0xe9/0x230 [scst] [<ffffffffa0335dfc>] scst_tgt_enable_store_work_fn+0x1c/0x20 [scst] [<ffffffffa0338ebc>] scst_process_sysfs_works+0xfc/0x1f0 [scst] [<ffffffffa033d180>] sysfs_work_thread_fn+0x120/0x2b0 [scst] [<ffffffff81074850>] kthread+0xf0/0x110 [<ffffffff815663fc>] ret_from_fork+0x7c/0xb0 -> #0 (scst_tgt_kref){+.+.+.}: [<ffffffff8109a95b>] __lock_acquire+0x17ab/0x1b10 [<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0 [<ffffffffa03375b9>] scst_kobject_put_and_wait+0x99/0x260 [scst] [<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst] [<ffffffffa03053dc>] scst_unregister_target+0x15c/0x3c0 [scst] [<ffffffffa029c69c>] ft_tport_delete+0x2c/0xa0 [fcst] [<ffffffffa029d3ec>] ft_lport_del+0x2c/0x40 [fcst] [<ffffffffa023e249>] fc_lport_iterate+0x49/0x80 [libfc] [<ffffffffa029d804>] ft_module_exit+0x36/0x832 [fcst] [<ffffffff810cd3f2>] SyS_delete_module+0x152/0x1f0 [<ffffffff815664a9>] system_call_fastpath+0x16/0x1b other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ft_lport_lock); lock(scst_tgt_kref); lock(ft_lport_lock); lock(scst_tgt_kref); *** DEADLOCK *** 2 locks held by rmmod/8653: #0: (fc_prov_mutex){+.+.+.}, at: [<ffffffffa023e222>] fc_lport_iterate+0x22/0x80 [libfc] #1: (ft_lport_lock){+.+.+.}, at: [<ffffffffa029d3db>] ft_lport_del+0x1b/0x40 [fcst] stack backtrace: CPU: 0 PID: 8653 Comm: rmmod Tainted: G W O 3.13.0-rc6-debug+ #5 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 ffffffff8222ce70 ffff88002efdbb70 ffffffff8155551c ffffffff8222ce70 ffff88002efdbbb0 ffffffff81552248 ffff88002efdbc00 ffff88002ed0ed88 ffff88002ed0e6d0 0000000000000002 0000000000000002 ffff88002ed0ed88 Call Trace: [<ffffffff8155551c>] dump_stack+0x4e/0x7a [<ffffffff81552248>] print_circular_bug+0x200/0x20f [<ffffffff8109a95b>] __lock_acquire+0x17ab/0x1b10 [<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0 [<ffffffffa03375b9>] scst_kobject_put_and_wait+0x99/0x260 [scst] [<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst] [<ffffffffa03053dc>] scst_unregister_target+0x15c/0x3c0 [scst] [<ffffffffa029c69c>] ft_tport_delete+0x2c/0xa0 [fcst] [<ffffffffa029d3ec>] ft_lport_del+0x2c/0x40 [fcst] [<ffffffffa023e249>] fc_lport_iterate+0x49/0x80 [libfc] [<ffffffffa029d804>] ft_module_exit+0x36/0x832 [fcst] [<ffffffff810cd3f2>] SyS_delete_module+0x152/0x1f0 [<ffffffff815664a9>] system_call_fastpath+0x16/0x1b git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5196 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This is the SCST development repository. It contains not a single project SCST as one can think, but a number of them, which are divided as the following: 1. SCST core in scst/ subdirectory 2. Administration utility for SCST core scstadmin in scstadmin/ 3. Target drivers in own subdirectories qla2x00t/, iscsi-scst/, etc. 4. User space programs in usr/ subdirectory, like fileio_tgt. 5. Some various docs in doc/ subdirectory. Those subprojects are in most cases independent from each other, although some of them depend from the SCST core. They put in the single repository only to simplify their development, they are released independently. Thus, use "make all" only if you really need to build everything. Otherwise build only what you need, like for iSCSI-SCST: make scst scst_install iscsi iscsi_install For more information about each subproject see their README files. Vladislav Bolkhovitin <vst@vlnb.net>, http://scst.sourceforge.net
Description
Languages
C
90.1%
Perl
4.2%
Shell
1.8%
HTML
1.7%
Makefile
1.2%
Other
0.9%