On Tue, 2016-01-26 at 18:33 +0000, Quinn Tran wrote: > Roland, > > The BUG_ON in this code area is sign of early free and/or double free > that is triggered in the LUN Reset path. The cmd_kref is being > decrement too fast. In this case it looks like the cmd is on the way > to be free (i.e. 2nd free), while a new incarnation of the command is > being schedule to do new work. The cmd_in_wq flag tells us that the > work element was scheduled or in the work queue by the new > incarnation. The early free of the command was triggered in TCM. > > Please take a look at the following patches that Nicholas has > submitted and Qlogic’s attempted to submit in the past. The "qla2xxx: > Fix interaction issue between qla2xxx and Target Core Module” patch > was asked to drop because it did not fit Bart’s implementation. > > > QLogic’s patch > [PATCH v2 08/16] qla2xxx: Replace QLA_TGT_STATE_ABORTED with a bit. > > http://marc.info/?l=linux-scsi&m=145038473432645&w=2 > > [PATCH 10/20] qla2xxx: Fix interaction issue between qla2xxx and Target Core Module > > http://marc.info/?l=linux-scsi&m=144953818431730&w=2 > > > > Nicholas’s Patch series or just patch 1 in the series. > > [PATCH 0/2] target: Fix LUN_RESET active I/O + TMR handling > > http://marc.info/?l=linux-scsi&m=145259439425172&w=2 > > [PATCH 1/2] target: Fix LUN_RESET active I/O handling for ACK_KREF > > http://marc.info/?l=linux-scsi&m=145259452525227&w=2 > > > > ---- > > Nicholas, > > Please consider "[PATCH 10/20] qla2xxx: Fix interaction issue between > qla2xxx and Target Core Module” patch for the older branch or > Pre-Bart. Thanks. > Thanks Quinn. AFAICT, the QUEUE_FULL + tcm_qla2xxx_aborted_task() parts of this patch are needed as separate driver bug-fixes, beyond the TCM multi-port LUN_RESET fixes mentioned above. That said, I've applied this patch to target-pending/master as-is, minus the extra kref debug as originally mentioned by HCH: https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=76dce933117e150ea9ddbce7c279808ec316a20a Please review. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html