On 1/12/16, 2:24 AM, "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxx> wrote: >From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > >Hi all, > >This -v1 series is to address two LUN_RESET active >I/O + TMR se_cmd->cmd_kref < 0 bugs as reported >recently by Quinn & Co, that can occur during >active I/O LUN_RESET with single / multiple LIO >export port configs. > >To address this bug, add __target_check_io_state() >common handler for ABORT_TASK + LUN_RESET I/O abort >cases, and move remaining se_cmd SGL page + release >into target_free_cmd_mem() to now be called directly >from the final target_release_cmd_kref() callback. > >Following __target_check_io_state() code, also obtain >kref_get_unless_zero(&se_cmd->cmd_kref) for LUN_RESET >TMR abort in core_tmr_drain_tmr_list(), in order to >utilize common transport_wait_for_tasks() code >when se_tmr_req descriptors are being shutdown. > >Note there are a few more cleanups to be had but >have been left off for the moment, ahead of these >specific fixes getting merged for v4.5-rc code. > >Please review, > >--nab > >Nicholas Bellinger (2): > target: Fix LUN_RESET active I/O handling for ACK_KREF > target: Fix LUN_RESET active TMR descriptor handling > > drivers/target/target_core_tmr.c | 96 +++++++++++++++++++++++++++------- > drivers/target/target_core_transport.c | 66 ++++++++++++++--------- > include/target/target_core_base.h | 1 + > 3 files changed, 118 insertions(+), 45 deletions(-) > >-- >1.9.1 > QT: Nicholas, both patches looks good. Thanks. >
<<attachment: winmail.dat>>