21 Apr, 2020

1 commit

  • [ Upstream commit 57c46e9f33da530a2485fa01aa27b6d18c28c796 ]

    A number of hangs have been reported against the target driver; they are
    due to the fact that multiple threads may try to destroy the iscsi session
    at the same time. This may be reproduced for example when a "targetcli
    iscsi/iqn.../tpg1 disable" command is executed while a logout operation is
    underway.

    When this happens, two or more threads may end up sleeping and waiting for
    iscsit_close_connection() to execute "complete(session_wait_comp)". Only
    one of the threads will wake up and proceed to destroy the session
    structure, the remaining threads will hang forever.

    Note that if the blocked threads are somehow forced to wake up with
    complete_all(), they will try to free the same iscsi session structure
    destroyed by the first thread, causing double frees, memory corruptions
    etc...

    With this patch, the threads that want to destroy the iscsi session will
    increase the session refcount and will set the "session_close" flag to 1;
    then they wait for the driver to close the remaining active connections.
    When the last connection is closed, iscsit_close_connection() will wake up
    all the threads and will wait for the session's refcount to reach zero;
    when this happens, iscsit_close_connection() will destroy the session
    structure because no one is referencing it anymore.

    INFO: task targetcli:5971 blocked for more than 120 seconds.
    Tainted: P OE 4.15.0-72-generic #81~16.04.1
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    targetcli D 0 5971 1 0x00000080
    Call Trace:
    __schedule+0x3d6/0x8b0
    ? vprintk_func+0x44/0xe0
    schedule+0x36/0x80
    schedule_timeout+0x1db/0x370
    ? __dynamic_pr_debug+0x8a/0xb0
    wait_for_completion+0xb4/0x140
    ? wake_up_q+0x70/0x70
    iscsit_free_session+0x13d/0x1a0 [iscsi_target_mod]
    iscsit_release_sessions_for_tpg+0x16b/0x1e0 [iscsi_target_mod]
    iscsit_tpg_disable_portal_group+0xca/0x1c0 [iscsi_target_mod]
    lio_target_tpg_enable_store+0x66/0xe0 [iscsi_target_mod]
    configfs_write_file+0xb9/0x120
    __vfs_write+0x1b/0x40
    vfs_write+0xb8/0x1b0
    SyS_write+0x5c/0xe0
    do_syscall_64+0x73/0x130
    entry_SYSCALL_64_after_hwframe+0x3d/0xa2

    Link: https://lore.kernel.org/r/20200313170656.9716-3-mlombard@redhat.com
    Reported-by: Matt Coleman
    Tested-by: Matt Coleman
    Tested-by: Rahul Kundu
    Signed-off-by: Maurizio Lombardi
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Maurizio Lombardi
     

13 Apr, 2019

2 commits

  • Since target_alloc_sgl() and iscsit_allocate_iovecs() allocate buffer space
    for se_cmd.data_length bytes and since that number can be smaller than the
    iSCSI Expected Data Transfer Length (EDTL), ensure that the iSCSI target
    driver does not attempt to receive more bytes than what fits in the receive
    buffer. Always receive the full immediate data buffer such that the iSCSI
    target driver does not attempt to parse immediate data as an iSCSI PDU.

    Note: the current code base only calls iscsit_get_dataout() if the size of
    the immediate data buffer does not exceed the buffer size derived from the
    SCSI CDB. See also target_cmd_size_check().

    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Nicholas Bellinger
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Instead of tracking the initiator that established an SPC-2 reservation,
    track the session through which the SPC-2 reservation has been
    established. This patch does not change any functionality.

    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Nicholas Bellinger
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

05 Feb, 2019

5 commits

  • Having both a function and a function pointer member with the same
    name (iscsit_release_cmd) is confusing. Hence rename the function pointer
    member.

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Change "unsoliticed" into "unsolicited".

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Sagi Grimberg
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Introduce a function that sends the SCSI status "BUSY" back to the
    initiator. The next patch will add a call to this function in the srpt
    target driver.

    Reviewed-by: Hannes Reinecke
    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Whether or not a session is being torn down does not affect whether or not
    SCSI commands are in the task set. Hence remove the "tearing down" checks
    from the TMF code. The TRANSPORT_ISTATE_PROCESSING check is left out
    because it is now safe to wait for a command that is in that state. The
    CMD_T_PRE_EXECUTE is left out because abort processing is postponed until
    after commands have left the pre-execute state since the patch that makes
    TMF processing synchronous.

    See also commit 1c21a48055a6 ("target: Avoid early CMD_T_PRE_EXECUTE
    failures during ABORT_TASK").

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Due to the patch that makes TMF handling synchronous the
    write_pending_status() callback function is no longer called. Hence remove
    it.

    Acked-by: Felipe Balbi
    Reviewed-by: Sagi Grimberg
    Reviewed-by: Andy Grover
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Bryant G. Ly
    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Himanshu Madhani
    Cc: Quinn Tran
    Cc: Saurav Kashyap
    Cc: Michael S. Tsirkin
    Cc: Juergen Gross
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

08 Dec, 2018

8 commits

  • In preparation for supporting user provided vendor strings, add an extra
    byte to the vendor, model and revision arrays in struct t10_wwn. This
    ensures that the full INQUIRY data can be carried in the arrays along with
    a null-terminator.

    Change a number of array readers and writers so that they account for
    explicit null-termination:

    - The pscsi_set_inquiry_info() and emulate_model_alias_store() codepaths
    don't currently explicitly null-terminate; fix this.

    - Existing t10_wwn field dumps use for-loops which step over
    null-terminators for right-padding.
    + Use printf with width specifiers instead.

    Signed-off-by: David Disseldorp
    Reviewed-by: Roman Bolshakov
    Signed-off-by: Martin K. Petersen

    David Disseldorp
     
  • Instead of invoking target driver callback functions from the context that
    handles an abort or LUN RESET task management function, only set the abort
    flag from that context and perform the actual abort handling from the
    context of the regular command processing flow. This approach has the
    advantage that the task management code becomes much easier to read and to
    verify since the number of potential race conditions against the command
    processing flow is strongly reduced.

    This patch has been tested by running the following two shell commands
    concurrently for about ten minutes for both the iSCSI and the SRP target
    drivers ($dev is an initiator device node connected with storage provided
    by the target driver under test):

    * fio with data verification enabled on a filesystem mounted on top of
    $dev.

    * while true; do sg_reset -d $dev; echo -n .; sleep .1; done

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • The TASK ABORTED STATUS (TAS) bit is defined as follows in SAM:
    "TASK_ABORTED: this status shall be returned if a command is aborted by a
    command or task management function on another I_T nexus and the control
    mode page TAS bit is set to one". TAS handling is spread over the target
    core and the iSCSI target driver. If a LUN RESET is received, the target
    core will send the TASK_ABORTED response for all commands for which such a
    response has to be sent. If an ABORT TASK is received, only the iSCSI
    target driver will send the TASK_ABORTED response for the commands for
    which that response has to be sent. That is a bug since all target drivers
    have to honor the TAS bit. Fix this by moving the code that handles TAS
    from the iSCSI target driver into the target core. Additionally, if a
    command has been aborted, instead of sending the TASK_ABORTED status from
    the context that processes the SCSI command send it from the context of the
    ABORT TMF. The core_tmr_abort_task() change in this patch causes the
    CMD_T_TAS flag to be set if a TASK_ABORTED status has to be sent back to
    the initiator that submitted the command. If that flag has been set
    transport_cmd_finish_abort() will send the TASK_ABORTED response.

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Instead of allowing the code that aborts a SCSI command to finish before
    all iSCSI data frames have been received, make that code wait until all
    iSCSI data frames have been received. Introduce a new member variable in
    the target driver template to communicate that information from the iSCSI
    target driver to the target core. This change allows to leave out the check
    whether or not it is already safe to send the TASK_ABORTED reply from
    transport_send_task_abort().

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • This patch does not change any functionality but makes the patch that makes
    TMF handling synchronous easier to read.

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • A quote from SAM-5: "The order in which task management requests are
    processed is not specified by the SCSI architecture model. The SCSI
    architecture model does not require in-order delivery of such task
    management requests or processing by the task manager in the order
    received. To guarantee the processing order of task management requests
    referencing sent to a specific logical unit, an application client should
    not have more than one such task management request pending to that logical
    unit." This means that it is safe to use the system workqueues instead of
    tmr_wq for processing TMFs. An intended side effect of this patch is that
    it enables concurrent processing of TMFs.

    Reviewed-by: Christoph Hellwig
    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • A session must only be released after all code that accesses the session
    structure has finished. Make sure that this is the case by introducing a
    new command counter per session that is only decremented after the
    .release_cmd() callback has finished. This patch fixes the following crash:

    BUG: KASAN: use-after-free in do_raw_spin_lock+0x1c/0x130
    Read of size 4 at addr ffff8801534b16e4 by task rmdir/14805
    CPU: 16 PID: 14805 Comm: rmdir Not tainted 4.18.0-rc2-dbg+ #5
    Call Trace:
    dump_stack+0xa4/0xf5
    print_address_description+0x6f/0x270
    kasan_report+0x241/0x360
    __asan_load4+0x78/0x80
    do_raw_spin_lock+0x1c/0x130
    _raw_spin_lock_irqsave+0x52/0x60
    srpt_set_ch_state+0x27/0x70 [ib_srpt]
    srpt_disconnect_ch+0x1b/0xc0 [ib_srpt]
    srpt_close_session+0xa8/0x260 [ib_srpt]
    target_shutdown_sessions+0x170/0x180 [target_core_mod]
    core_tpg_del_initiator_node_acl+0xf3/0x200 [target_core_mod]
    target_fabric_nacl_base_release+0x25/0x30 [target_core_mod]
    config_item_release+0x9c/0x110 [configfs]
    config_item_put+0x26/0x30 [configfs]
    configfs_rmdir+0x3b8/0x510 [configfs]
    vfs_rmdir+0xb3/0x1e0
    do_rmdir+0x262/0x2c0
    do_syscall_64+0x77/0x230
    entry_SYSCALL_64_after_hwframe+0x49/0xbe

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Since transport_clear_lun_ref() already waits until the percpu-refcount
    .release() method is called, it is not necessary to wait first until
    percpu_ref_kill_and_confirm() has finished transitioning the refcount into
    atomic mode. Remove the code that waits for percpu_ref_kill_and_confirm()
    to complete and also the completion object that is used by that code. This
    patch does not change the behavior of the SCSI target code.

    Cc: Nicholas Bellinger
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: David Disseldorp
    Cc: Hannes Reinecke
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

29 Nov, 2018

3 commits

  • iscsi_target_mod is the only LIO fabric where fabric_ops.name differs from
    the fabric_ops.fabric_name string. fabric_ops.name is used when matching
    target/$fabric ConfigFS create paths, so rename it .fabric_alias and
    fallback to target/$fabric vs .fabric_name comparison if .fabric_alias
    isn't initialised. iscsi_target_mod is the only fabric module to set
    .fabric_alias . All other fabric modules rely on .fabric_name matching and
    can drop the duplicate string.

    Signed-off-by: David Disseldorp
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    David Disseldorp
     
  • All fabrics return a const string. In all cases *except* iSCSI the
    get_fabric_name() string matches fabric_ops.name.

    Both fabric_ops.get_fabric_name() and fabric_ops.name are user-facing, with
    the former being used for PR/ALUA state and the latter for ConfigFS
    (config/target/$name), so we unfortunately need to keep both strings around
    for now. Replace the useless .get_fabric_name() accessor function with a
    const string fabric_name member variable.

    Signed-off-by: David Disseldorp
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    David Disseldorp
     
  • On write, the pi_prot_format configfs attribute invokes the device
    format_prot() callback if present. Read dumps the contents of
    se_dev_attrib.pi_prot_format which is always zero. Make the configfs
    attribute write-only, and drop the always zero se_dev_attrib.pi_prot_format
    storage.

    Signed-off-by: David Disseldorp
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    David Disseldorp
     

22 Nov, 2018

1 commit

  • The new emulate_pr backstore attribute allows for Persistent Reservation
    and SCSI2 RESERVE/RELEASE support to be completely disabled. This can be
    useful for scenarios such as:

    - Ensuring ATS (Compare & Write) usage on recent VMware ESXi initiators.

    - Allowing clustered (e.g. tcm-user) backends to block such requests,
    avoiding the multi-node reservation state propagation.

    When explicitly disabled, PR and RESERVE/RELEASE requests receive Invalid
    Command Operation Code response sense data.

    Signed-off-by: David Disseldorp
    Reviewed-by: Mike Christie
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    David Disseldorp
     

16 Oct, 2018

2 commits


03 Aug, 2018

3 commits

  • This adds a function to remove a session which should be used by drivers
    that use target_setup_session. The next patches will convert the target
    drivers to use this new function.

    Signed-off-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Chris Boot
    Cc: Bryant G. Ly
    Cc: Michael Cyr
    Cc:
    Cc: Johannes Thumshirn
    Cc: Felipe Balbi
    Cc: Sebastian Andrzej Siewior
    Cc: Andrzej Pietrasiewicz
    Cc: Michael S. Tsirkin
    Cc: Juergen Gross
    Signed-off-by: Martin K. Petersen

    Mike Christie
     
  • Rename target_alloc_session to target_setup_session to avoid confusion with
    the other transport session allocation function that only allocates the
    session and because the target_alloc_session does so much more. It
    allocates the session, sets up the nacl and registers the session.

    The next patch will then add a remove function to match the setup in this
    one, so it should make sense for all drivers, except iscsi, to just call
    those 2 functions to setup and remove a session.

    iscsi will continue to be the odd driver.

    Signed-off-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Chris Boot
    Cc: Bryant G. Ly
    Cc: Michael Cyr
    Cc:
    Cc: Johannes Thumshirn
    Cc: Felipe Balbi
    Cc: Sebastian Andrzej Siewior
    Cc: Andrzej Pietrasiewicz
    Cc: Michael S. Tsirkin
    Cc: Juergen Gross
    Signed-off-by: Martin K. Petersen

    Mike Christie
     
  • transport_init_session_tags is only called from target_core_transport.c so
    make it static.

    Signed-off-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Mike Christie
     

31 Jul, 2018

1 commit

  • This just adds a helper function to check if a device is configured and it
    converts the target users to use it. The next patch will add a backend
    module user so those types of modules do not have to know the lio core
    details.

    Signed-off-by: Mike Christie
    Reviewed-by: Xiubo Li
    Signed-off-by: Martin K. Petersen

    Mike Christie
     

03 Jul, 2018

6 commits

  • se_dev_entry.ua_count is only used to check whether or not
    se_dev_entry.ua_list is empty. Use list_empty_careful() instead. Checking
    whether or not ua_list is empty without holding the lock that protects that
    list is fine because the code that dequeues from that list will check again
    whether or not that list is empty.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Since most target drivers do not use the second fabric_make_tpg() argument
    ("group") and since it is trivial to derive the group pointer from the wwn
    pointer, do not pass the group pointer to fabric_make_tpg().

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Felipe Balbi
    Cc: Hannes Reinecke
    Cc: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Instead of embedding the completion that is used for waiting for command
    completion in struct se_cmd, let the context that waits for command
    completion allocate it. This makes it possible to have a single code path
    for non-aborted and aborted commands in target_release_cmd_kref() and
    avoids that transport_generic_free_cmd() has to call
    cmd->se_tfo->release_cmd() directly. This patch does not change any
    functionality. Note: transport_generic_free_cmd() only waits until the
    se_cmd reference count has reached zero after it has set both
    CMD_T_FABRIC_STOP and CMD_T_ABORTED.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Hannes Reinecke
    Cc: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Target drivers must call target_sess_cmd_list_set_waiting() and
    target_wait_for_sess_cmds() before freeing a session. Since freeing a
    session is only safe after all commands that are associated with a session
    have finished, make target_wait_for_sess_cmds() also wait for commands that
    are being aborted. Instead of setting a flag in each pending command from
    target_sess_cmd_list_set_waiting() and waiting in
    target_wait_for_sess_cmds() on a per-command completion, only set a
    per-session flag in the former function and wait on a per-session
    completion in the latter function. This change is safe because once a SCSI
    initiator system has submitted a command a target system is always allowed
    to execute it to completion. See also commit 0f4a943168f3 ("target: Fix
    remote-port TMR ABORT + se_cmd fabric stop").

    This patch is based on the following two patches:

    * Bart Van Assche, target: Simplify session shutdown code, February 19, 2015
    (https://github.com/bvanassche/linux/commit/8df5463d7d7619f2f1b70cfe5172eaef0aa52815).

    * Christoph Hellwig, target: Rework session shutdown code, December 7, 2015
    (http://thread.gmane.org/gmane.linux.scsi.target.devel/10695).

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Hannes Reinecke
    Cc: Christoph Hellwig
    Cc: Sagi Grimberg
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Other than initializing xcopy_pt_sess.sess_wait_list, this patch does not
    change any functionality.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Mike Christie
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Cc: Mike Christie
    Cc: Hannes Reinecke
    Cc: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

27 Jun, 2018

1 commit


20 Jun, 2018

2 commits

  • The sbitmap and the percpu_ida perform essentially the same task,
    allocating tags for commands. The sbitmap outperforms the percpu_ida as
    documented here: https://lkml.org/lkml/2014/4/22/553

    The sbitmap interface is a little harder to use, but being able to remove
    the percpu_ida code and getting better performance justifies the additional
    complexity.

    Signed-off-by: Matthew Wilcox
    Acked-by: Felipe Balbi # f_tcm
    Reviewed-by: Jens Axboe
    Signed-off-by: Martin K. Petersen

    Matthew Wilcox
     
  • Introduce target_free_tag() and convert all drivers to use it.

    Signed-off-by: Matthew Wilcox
    Reviewed-by: Jens Axboe
    Signed-off-by: Martin K. Petersen

    Matthew Wilcox
     

19 May, 2018

1 commit

  • When a tape drive is exported via LIO using the pscsi module, a read
    that requests more bytes per block than the tape can supply returns an
    empty buffer. This is because the pscsi pass-through target module sees
    the "ILI" illegal length bit set and thinks there is no reason to return
    the data.

    This is a long-standing transport issue, since it assumes that no data
    need be returned under a check condition, which isn't always the case
    for tape.

    Add in a check for tape reads with the ILI, EOM, or FM bits set, with a
    sense code of NO_SENSE, treating such cases as if the read
    succeeded. The layered tape driver then "does the right thing" when it
    gets such a response.

    Signed-off-by: Bodo Stroesser
    Signed-off-by: Lee Duncan
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Lee Duncan
     

17 Jan, 2018

1 commit

  • This patch adds a new group of files that are to be used to
    have the kernel module execution some action. The next patch
    will have target_core_user use the group/files to be able to block
    a device and to reset its memory buffer used to pass commands
    between user/kernel space.

    This type of file is different from the existing device attributes
    in that they may be write only and when written to they result in
    the kernel module executing some function. These need to be
    separate from the normal device attributes which get/set device
    values so userspace can continue to loop over all the attribs and
    get/set them during initialization.

    Signed-off-by: Mike Christie
    Signed-off-by: Nicholas Bellinger

    Mike Christie
     

13 Jan, 2018

1 commit


25 Nov, 2017

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:

    "This series is predominantly bug-fixes, with a few small improvements
    that have been outstanding over the last release cycle.

    As usual, the associated bug-fixes have CC' tags for stable.

    Also, things have been particularly quiet wrt new developments the
    last months, with most folks continuing to focus on stability atop 4.x
    stable kernels for their respective production configurations.

    Also at this point, the stable trees have been synced up with
    mainline. This will continue to be a priority, as production users
    tend to run exclusively atop stable kernels, a few releases behind
    mainline.

    The highlights include:

    - Fix PR PREEMPT_AND_ABORT null pointer dereference regression in
    v4.11+ (tangwenji)

    - Fix OOPs during removing TCMU device (Xiubo Li + Zhang Zhuoyu)

    - Add netlink command reply supported option for each device (Kenjiro
    Nakayama)

    - cxgbit: Abort the TCP connection in case of data out timeout (Varun
    Prakash)

    - Fix PR/ALUA file path truncation (David Disseldorp)

    - Fix double se_cmd completion during ->cmd_time_out (Mike Christie)

    - Fix QUEUE_FULL + SCSI task attribute handling in 4.1+ (Bryant Ly +
    nab)

    - Fix quiese during transport_write_pending_qf endless loop (nab)

    - Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK in 3.14+
    (Don White + nab)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (35 commits)
    tcmu: Add a missing unlock on an error path
    tcmu: Fix some memory corruption
    iscsi-target: Fix non-immediate TMR reference leak
    iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
    target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
    target: Fix quiese during transport_write_pending_qf endless loop
    target: Fix caw_sem leak in transport_generic_request_failure
    target: Fix QUEUE_FULL + SCSI task attribute handling
    iSCSI-target: Use common error handling code in iscsi_decode_text_input()
    target/iscsi: Detect conn_cmd_list corruption early
    target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd()
    target/iscsi: Modify iscsit_do_crypto_hash_buf() prototype
    target/iscsi: Fix endianness in an error message
    target/iscsi: Use min() in iscsit_dump_data_payload() instead of open-coding it
    target/iscsi: Define OFFLOAD_BUF_SIZE once
    target: Inline transport_put_cmd()
    target: Suppress gcc 7 fallthrough warnings
    target: Move a declaration of a global variable into a header file
    tcmu: fix double se_cmd completion
    target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES
    ...

    Linus Torvalds
     

15 Nov, 2017

1 commit

  • Pull configfs updates from Christoph Hellwig:
    "A couple of configfs cleanups:

    - proper use of the bool type (Thomas Meyer)

    - constification of struct config_item_type (Bhumika Goyal)"

    * tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/configfs:
    RDMA/cma: make config_item_type const
    stm class: make config_item_type const
    ACPI: configfs: make config_item_type const
    nvmet: make config_item_type const
    usb: gadget: configfs: make config_item_type const
    PCI: endpoint: make config_item_type const
    iio: make function argument and some structures const
    usb: gadget: make config_item_type structures const
    dlm: make config_item_type const
    netconsole: make config_item_type const
    nullb: make config_item_type const
    ocfs2/cluster: make config_item_type const
    target: make config_item_type const
    configfs: make ci_type field, some pointers and function arguments const
    configfs: make config_item_type const
    configfs: Fix bool initialization/comparison

    Linus Torvalds