Skip to content

Commit

Permalink
tcm_qla2xxx: Fix incorrect tcm_qla2xxx_drop_tpg() tgt_stopped usage
Browse files Browse the repository at this point in the history
This patch changes tcm_qla2xxx_drop_tpg() to check for tgt_stop instead
of tgt_stopped usage, as tgt_stopped = 1 is expected to be set during
normal endpoint shutdown usage.

This addresses the following dump_stack() warning during shutdown:

[51024.579296] Already in tgt->tgt_stop or tgt_stopped state
[51024.585316] Pid: 22371, comm: rmdir Not tainted 2.6.38.3+ torvalds#13
[51024.591754] Call Trace:
[51024.594489]  [<ffffffffa0308150>] ? qla_tgt_stop_phase1+0x3a/0x27c [qla2xxx]
[51024.602350]  [<ffffffff810bf56c>] ? free_debug_processing+0x1bd/0x200
[51024.609530]  [<ffffffff810d5d5d>] ? dput+0x30/0x14d
[51024.614969]  [<ffffffffa018dfc5>] ? tcm_qla2xxx_drop_tpg+0x3d/0x6b [tcm_qla2xxx]
[51024.623208]  [<ffffffffa0105ef2>] ? target_fabric_tpg_release+0x1b/0x1d [target_core_mod]
[51024.632327]  [<ffffffffa005bd35>] ? config_item_release+0x5a/0x80 [configfs]
[51024.640184]  [<ffffffffa005bcdb>] ? config_item_release+0x0/0x80 [configfs]
[51024.647951]  [<ffffffff811aa416>] ? kref_put+0x43/0x4d
[51024.653678]  [<ffffffffa005bcd9>] ? config_item_put+0x19/0x1b [configfs]
[51024.661152]  [<ffffffffa005a743>] ? configfs_rmdir+0x1ca/0x231 [configfs]
[51024.668712]  [<ffffffff810cdcfd>] ? vfs_rmdir+0x7d/0xcb
[51024.674540]  [<ffffffff810cfce5>] ? do_rmdir+0xa9/0xf8
[51024.680258]  [<ffffffff810cfd6b>] ? sys_rmdir+0x11/0x13
[51024.686085]  [<ffffffff81002992>] ? system_call_fastpath+0x16/0x1b

Reported-by: Roland Dreier <[email protected]>
Signed-off-by: Madhuranath Iyengar <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
Madhuranath Iyengar authored and Nicholas Bellinger committed Sep 24, 2011
1 parent 76b67e3 commit 173fc51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/tcm_qla2xxx/tcm_qla2xxx_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static void tcm_qla2xxx_drop_tpg(struct se_portal_group *se_tpg)
* Call into qla2x_target.c LLD logic to shutdown the active
* FC Nexuses and disable target mode operation for this qla_hw_data
*/
if (ha->qla_tgt && !ha->qla_tgt->tgt_stopped)
if (ha->qla_tgt && !ha->qla_tgt->tgt_stop)
qla_tgt_stop_phase1(ha->qla_tgt);

core_tpg_deregister(se_tpg);
Expand Down

0 comments on commit 173fc51

Please sign in to comment.