29 Feb, 2020

3 commits

  • commit 807b9515b7d044cf77df31f1af9d842a76ecd5cb upstream.

    Since commit e9d3009cb936 introduced a regression and since the fix for
    that regression was not perfect, revert this commit.

    Link: https://marc.info/?l=target-devel&m=158157054906195
    Cc: Rahul Kundu
    Cc: Mike Marciniszyn
    Cc: Sagi Grimberg
    Reported-by: Dakshaja Uppalapati
    Fixes: e9d3009cb936 ("scsi: target: iscsi: Wait for all commands to finish before freeing a session")
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     
  • commit 76261ada16dcc3be610396a46d35acc3efbda682 upstream.

    Since commit 04060db41178 introduces soft lockups when toggling network
    interfaces, revert it.

    Link: https://marc.info/?l=target-devel&m=158157054906196
    Cc: Rahul Kundu
    Cc: Mike Marciniszyn
    Cc: Sagi Grimberg
    Reported-by: Dakshaja Uppalapati
    Fixes: 04060db41178 ("scsi: RDMA/isert: Fix a recently introduced regression related to logout")
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     
  • commit c14335ebb92a98646ddbf447e6cacc66de5269ad upstream.

    Commit 83f85b8ec305 postponed the percpu_ref_put(&se_cmd->se_lun->lun_ref)
    call from command completion to the time when the final command reference
    is dropped. That approach is not compatible with the iSCSI target driver
    because the iSCSI target driver keeps the command with the highest stat_sn
    after it has completed until the next command is received (see also
    iscsit_ack_from_expstatsn()). Fix this regression by reverting commit
    83f85b8ec305.

    Fixes: 83f85b8ec305 ("scsi: target/core: Inline transport_lun_remove_cmd()")
    Cc: Pavel Zakharov
    Cc: Mike Christie
    Cc:
    Link: https://lore.kernel.org/r/20200210051202.12934-1-bvanassche@acm.org
    Reported-by: Pavel Zakharov
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     

29 Jan, 2020

1 commit

  • commit 04060db41178c7c244f2c7dcd913e7fd331de915 upstream.

    iscsit_close_connection() calls isert_wait_conn(). Due to commit
    e9d3009cb936 both functions call target_wait_for_sess_cmds() although that
    last function should be called only once. Fix this by removing the
    target_wait_for_sess_cmds() call from isert_wait_conn() and by only calling
    isert_wait_conn() after target_wait_for_sess_cmds().

    Fixes: e9d3009cb936 ("scsi: target: iscsi: Wait for all commands to finish before freeing a session").
    Link: https://lore.kernel.org/r/20200116044737.19507-1-bvanassche@acm.org
    Reported-by: Rahul Kundu
    Signed-off-by: Bart Van Assche
    Tested-by: Mike Marciniszyn
    Acked-by: Sagi Grimberg
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     

23 Jan, 2020

1 commit

  • commit c941e0d172605731de9b4628bd4146d35cf2e7d6 upstream.

    Print the string for which conversion failed instead of printing the
    function name twice.

    Fixes: 2650d71e244f ("target: move transport ID handling to the core")
    Cc: Christoph Hellwig
    Link: https://lore.kernel.org/r/20191107215525.64415-1-bvanassche@acm.org
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     

18 Jan, 2020

1 commit

  • [ Upstream commit e4dc9a4c31fe10d1751c542702afc85be8a5c56a ]

    The sector size of the block layer is 512 bytes, but integrity interval
    size might be different (in case of 4K block size of the media). At the
    initiator side the virtual start sector is the one that was originally
    submitted by the block layer (512 bytes) for the Reftag usage. The
    initiator converts the Reftag to integrity interval units and sends it to
    the target. So the target virtual start sector should be calculated at
    integrity interval units. prepare_fn() and complete_fn() don't remap
    correctly the Reftag when using incorrect units of the virtual start
    sector, which leads to the following protection error at the device:

    "blk_update_request: protection error, dev sdb, sector 2048 op 0x0:(READ)
    flags 0x10000 phys_seg 1 prio class 0"

    To fix that, set the seed in integrity interval units.

    Link: https://lore.kernel.org/r/1576078562-15240-1-git-send-email-israelr@mellanox.com
    Signed-off-by: Israel Rukshin
    Reviewed-by: Max Gurtovoy
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Israel Rukshin
     

05 Jan, 2020

3 commits

  • [ Upstream commit e9d3009cb936bd0faf0719f68d98ad8afb1e613b ]

    The iSCSI target driver is the only target driver that does not wait for
    ongoing commands to finish before freeing a session. Make the iSCSI target
    driver wait for ongoing commands to finish before freeing a session. This
    patch fixes the following KASAN complaint:

    BUG: KASAN: use-after-free in __lock_acquire+0xb1a/0x2710
    Read of size 8 at addr ffff8881154eca70 by task kworker/0:2/247

    CPU: 0 PID: 247 Comm: kworker/0:2 Not tainted 5.4.0-rc1-dbg+ #6
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
    Workqueue: target_completion target_complete_ok_work [target_core_mod]
    Call Trace:
    dump_stack+0x8a/0xd6
    print_address_description.constprop.0+0x40/0x60
    __kasan_report.cold+0x1b/0x33
    kasan_report+0x16/0x20
    __asan_load8+0x58/0x90
    __lock_acquire+0xb1a/0x2710
    lock_acquire+0xd3/0x200
    _raw_spin_lock_irqsave+0x43/0x60
    target_release_cmd_kref+0x162/0x7f0 [target_core_mod]
    target_put_sess_cmd+0x2e/0x40 [target_core_mod]
    lio_check_stop_free+0x12/0x20 [iscsi_target_mod]
    transport_cmd_check_stop_to_fabric+0xd8/0xe0 [target_core_mod]
    target_complete_ok_work+0x1b0/0x790 [target_core_mod]
    process_one_work+0x549/0xa40
    worker_thread+0x7a/0x5d0
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    Allocated by task 889:
    save_stack+0x23/0x90
    __kasan_kmalloc.constprop.0+0xcf/0xe0
    kasan_slab_alloc+0x12/0x20
    kmem_cache_alloc+0xf6/0x360
    transport_alloc_session+0x29/0x80 [target_core_mod]
    iscsi_target_login_thread+0xcd6/0x18f0 [iscsi_target_mod]
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    Freed by task 1025:
    save_stack+0x23/0x90
    __kasan_slab_free+0x13a/0x190
    kasan_slab_free+0x12/0x20
    kmem_cache_free+0x146/0x400
    transport_free_session+0x179/0x2f0 [target_core_mod]
    transport_deregister_session+0x130/0x180 [target_core_mod]
    iscsit_close_session+0x12c/0x350 [iscsi_target_mod]
    iscsit_logout_post_handler+0x136/0x380 [iscsi_target_mod]
    iscsit_response_queue+0x8de/0xbe0 [iscsi_target_mod]
    iscsi_target_tx_thread+0x27f/0x370 [iscsi_target_mod]
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    The buggy address belongs to the object at ffff8881154ec9c0
    which belongs to the cache se_sess_cache of size 352
    The buggy address is located 176 bytes inside of
    352-byte region [ffff8881154ec9c0, ffff8881154ecb20)
    The buggy address belongs to the page:
    page:ffffea0004553b00 refcount:1 mapcount:0 mapping:ffff888101755400 index:0x0 compound_mapcount: 0
    flags: 0x2fff000000010200(slab|head)
    raw: 2fff000000010200 dead000000000100 dead000000000122 ffff888101755400
    raw: 0000000000000000 0000000080130013 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected

    Memory state around the buggy address:
    ffff8881154ec900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    ffff8881154ec980: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
    >ffff8881154eca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ^
    ffff8881154eca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ffff8881154ecb00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc

    Cc: Mike Christie
    Link: https://lore.kernel.org/r/20191113220508.198257-3-bvanassche@acm.org
    Reviewed-by: Roman Bolshakov
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Bart Van Assche
     
  • [ Upstream commit 80647a89eaf3f2549741648f3230cd6ff68c23b4 ]

    The SCSI specs require releasing SPC-2 reservations when a session is
    closed. Make sure that the target core does this.

    Running the libiscsi tests triggers the KASAN complaint shown below. This
    patch fixes that use-after-free.

    BUG: KASAN: use-after-free in target_check_reservation+0x171/0x980 [target_core_mod]
    Read of size 8 at addr ffff88802ecd1878 by task iscsi_trx/17200

    CPU: 0 PID: 17200 Comm: iscsi_trx Not tainted 5.4.0-rc1-dbg+ #1
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    Call Trace:
    dump_stack+0x8a/0xd6
    print_address_description.constprop.0+0x40/0x60
    __kasan_report.cold+0x1b/0x34
    kasan_report+0x16/0x20
    __asan_load8+0x58/0x90
    target_check_reservation+0x171/0x980 [target_core_mod]
    __target_execute_cmd+0xb1/0xf0 [target_core_mod]
    target_execute_cmd+0x22d/0x4d0 [target_core_mod]
    transport_generic_new_cmd+0x31f/0x5b0 [target_core_mod]
    transport_handle_cdb_direct+0x6f/0x90 [target_core_mod]
    iscsit_execute_cmd+0x381/0x3f0 [iscsi_target_mod]
    iscsit_sequence_cmd+0x13b/0x1f0 [iscsi_target_mod]
    iscsit_process_scsi_cmd+0x4c/0x130 [iscsi_target_mod]
    iscsit_get_rx_pdu+0x8e8/0x15f0 [iscsi_target_mod]
    iscsi_target_rx_thread+0x105/0x1b0 [iscsi_target_mod]
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    Allocated by task 1079:
    save_stack+0x23/0x90
    __kasan_kmalloc.constprop.0+0xcf/0xe0
    kasan_slab_alloc+0x12/0x20
    kmem_cache_alloc+0xfe/0x3a0
    transport_alloc_session+0x29/0x80 [target_core_mod]
    iscsi_target_login_thread+0xceb/0x1920 [iscsi_target_mod]
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    Freed by task 17193:
    save_stack+0x23/0x90
    __kasan_slab_free+0x13a/0x190
    kasan_slab_free+0x12/0x20
    kmem_cache_free+0xc8/0x3e0
    transport_free_session+0x179/0x2f0 [target_core_mod]
    transport_deregister_session+0x121/0x170 [target_core_mod]
    iscsit_close_session+0x12c/0x350 [iscsi_target_mod]
    iscsit_logout_post_handler+0x136/0x380 [iscsi_target_mod]
    iscsit_response_queue+0x8fa/0xc00 [iscsi_target_mod]
    iscsi_target_tx_thread+0x28e/0x390 [iscsi_target_mod]
    kthread+0x1bc/0x210
    ret_from_fork+0x24/0x30

    The buggy address belongs to the object at ffff88802ecd1860
    which belongs to the cache se_sess_cache of size 352
    The buggy address is located 24 bytes inside of
    352-byte region [ffff88802ecd1860, ffff88802ecd19c0)
    The buggy address belongs to the page:
    page:ffffea0000bb3400 refcount:1 mapcount:0 mapping:ffff8880bef2ed00 index:0x0 compound_mapcount: 0
    flags: 0x1000000000010200(slab|head)
    raw: 1000000000010200 dead000000000100 dead000000000122 ffff8880bef2ed00
    raw: 0000000000000000 0000000080270027 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected

    Memory state around the buggy address:
    ffff88802ecd1700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ffff88802ecd1780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    >ffff88802ecd1800: fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb fb
    ^
    ffff88802ecd1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ffff88802ecd1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

    Cc: Mike Christie
    Link: https://lore.kernel.org/r/20191113220508.198257-2-bvanassche@acm.org
    Reviewed-by: Roman Bolshakov
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Bart Van Assche
     
  • [ Upstream commit 9cef2a7955f2754257a7cddedec16edae7b587d0 ]

    RFC 2307 states:

    For CHAP [RFC1994], in the first step, the initiator MUST send:

    CHAP_A=

    Where A1,A2... are proposed algorithms, in order of preference.
    ...
    For the Algorithm, as stated in [RFC1994], one value is required to
    be implemented:

    5 (CHAP with MD5)

    LIO currently checks for this value by only comparing a single byte in
    the tokenized Algorithm string, which means that any value starting with
    a '5' (e.g. "55") is interpreted as "CHAP with MD5". Fix this by
    comparing the entire tokenized string.

    Reviewed-by: Lee Duncan
    Reviewed-by: Mike Christie
    Signed-off-by: David Disseldorp
    Link: https://lore.kernel.org/r/20190912095547.22427-2-ddiss@suse.de
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    David Disseldorp
     

03 Nov, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Nine changes, eight in drivers [ufs, target, lpfc x 2, qla2xxx x 4]
    and one core change in sd that fixes an I/O failure on DIF type 3
    devices"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: qla2xxx: stop timer in shutdown path
    scsi: sd: define variable dif as unsigned int instead of bool
    scsi: target: cxgbit: Fix cxgbit_fw4_ack()
    scsi: qla2xxx: Fix partial flash write of MBI
    scsi: qla2xxx: Initialized mailbox to prevent driver load failure
    scsi: lpfc: Honor module parameter lpfc_use_adisc
    scsi: ufs-bsg: Wake the device before sending raw upiu commands
    scsi: lpfc: Check queue pointer before use
    scsi: qla2xxx: fixup incorrect usage of host_byte

    Linus Torvalds
     

26 Oct, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Nine changes, eight to drivers (qla2xxx, hpsa, lpfc, alua, ch,
    53c710[x2], target) and one core change that tries to close a race
    between sysfs delete and module removal"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: lpfc: remove left-over BUILD_NVME defines
    scsi: core: try to get module before removing device
    scsi: hpsa: add missing hunks in reset-patch
    scsi: target: core: Do not overwrite CDB byte 1
    scsi: ch: Make it possible to open a ch device multiple times again
    scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE
    scsi: sni_53c710: fix compilation error
    scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions
    scsi: qla2xxx: fix a potential NULL pointer dereference

    Linus Torvalds
     

25 Oct, 2019

1 commit

  • Use the pointer 'p' after having tested that pointer instead of before.

    Fixes: 5cadafb236df ("target/cxgbit: Fix endianness annotations")
    Cc: Varun Prakash
    Cc: Nicholas Bellinger
    Cc:
    Link: https://lore.kernel.org/r/20191023202150.22173-1-bvanassche@acm.org
    Reported-by: Dan Carpenter
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

18 Oct, 2019

1 commit

  • passthrough_parse_cdb() - used by TCMU and PSCSI - attepts to reset the LUN
    field of SCSI-2 CDBs (bits 5,6,7 of byte 1). The current code is wrong as
    for newer commands not having the LUN field it overwrites relevant command
    bits (e.g. for SECURITY PROTOCOL IN / OUT). We think this code was
    unnecessary from the beginning or at least it is no longer useful. So we
    remove it entirely.

    Link: https://lore.kernel.org/r/12498eab-76fd-eaad-1316-c2827badb76a@ts.fujitsu.com
    Signed-off-by: Bodo Stroesser
    Reviewed-by: Bart Van Assche
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Bodo Stroesser
     

25 Sep, 2019

1 commit

  • Patch series "Make working with compound pages easier", v2.

    These three patches add three helpers and convert the appropriate
    places to use them.

    This patch (of 3):

    It's unnecessarily hard to find out the size of a potentially huge page.
    Replace 'PAGE_SIZE << compound_order(page)' with page_size(page).

    Link: http://lkml.kernel.org/r/20190721104612.19120-2-willy@infradead.org
    Signed-off-by: Matthew Wilcox (Oracle)
    Acked-by: Michal Hocko
    Reviewed-by: Andrew Morton
    Reviewed-by: Ira Weiny
    Acked-by: Kirill A. Shutemov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox (Oracle)
     

22 Sep, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: qla2xxx, ufs, smartpqi,
    lpfc, hisi_sas, qedf, mpt3sas; plus a whole load of minor updates. The
    only core change this time around is the addition of request batching
    for virtio. Since batching requires an additional flag to use, it
    should be invisible to the rest of the drivers"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (264 commits)
    scsi: hisi_sas: Fix the conflict between device gone and host reset
    scsi: hisi_sas: Add BIST support for phy loopback
    scsi: hisi_sas: Add hisi_sas_debugfs_alloc() to centralise allocation
    scsi: hisi_sas: Remove some unused function arguments
    scsi: hisi_sas: Remove redundant work declaration
    scsi: hisi_sas: Remove hisi_sas_hw.slot_complete
    scsi: hisi_sas: Assign NCQ tag for all NCQ commands
    scsi: hisi_sas: Update all the registers after suspend and resume
    scsi: hisi_sas: Retry 3 times TMF IO for SAS disks when init device
    scsi: hisi_sas: Remove sleep after issue phy reset if sas_smp_phy_control() fails
    scsi: hisi_sas: Directly return when running I_T_nexus reset if phy disabled
    scsi: hisi_sas: Use true/false as input parameter of sas_phy_reset()
    scsi: hisi_sas: add debugfs auto-trigger for internal abort time out
    scsi: virtio_scsi: unplug LUNs when events missed
    scsi: scsi_dh_rdac: zero cdb in send_mode_select()
    scsi: fcoe: fix null-ptr-deref Read in fc_release_transport
    scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code
    scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code
    scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
    scsi: ufs: Use kmemdup in ufshcd_read_string_desc()
    ...

    Linus Torvalds
     

28 Aug, 2019

1 commit


15 Aug, 2019

1 commit

  • In tcmu_handle_completion() function, the variable called read_len is
    always initialized with a value taken from se_cmd structure. If this
    function is called to complete an expired (timed out) out command, the
    session command pointed by se_cmd is likely to be already deallocated by
    the target core at that moment. As the result, this access triggers a
    use-after-free warning from KASAN.

    This patch fixes the code not to touch se_cmd when completing timed out
    TCMU commands. It also resets the pointer to se_cmd at the time when the
    TCMU_CMD_BIT_EXPIRED flag is set because it is going to become invalid
    after calling target_complete_cmd() later in the same function,
    tcmu_check_expired_cmd().

    Signed-off-by: Dmitry Fomichev
    Acked-by: Mike Christie
    Reviewed-by: Damien Le Moal
    Signed-off-by: Martin K. Petersen

    Dmitry Fomichev
     

08 Aug, 2019

1 commit

  • If the userspace process crashes while we send the nl msg, it is possible
    that the cmd in curr_nl_cmd of tcmu_dev never gets reset to 0, and and
    returns busy for other commands after the userspace process is restartd.

    More details below:

    /backstores/user:file/file> set attribute dev_size=2048
    Cannot set attribute dev_size: [Errno 3] No such process
    /backstores/user:file/file> set attribute dev_size=2048
    Cannot set attribute dev_size: [Errno 16] Device or resource busy

    with following kernel messages:
    [173605.747169] Unable to reconfigure device
    [173616.686674] tcmu daemon: command reply support 1.
    [173623.866978] netlink cmd 3 already executing on file
    [173623.866984] Unable to reconfigure device

    Also, it is not safe to leave the nl_cmd in the list, and not get deleted.

    This patch removes the nl_cmd from the list, and clear its data if it is
    not sent successfully.

    Signed-off-by: Li Zhong
    Acked-by: Mike Christie
    Signed-off-by: Martin K. Petersen

    Li Zhong
     

07 Aug, 2019

1 commit


31 Jul, 2019

1 commit


25 Jul, 2019

1 commit


23 Jul, 2019

2 commits


12 Jul, 2019

2 commits

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs,
    mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the
    removal of the osst driver (I heard from Willem privately that he
    would like the driver removed because all his test hardware has
    failed). Plus number of minor changes, spelling fixes and other
    trivia.

    The big merge conflict this time around is the SPDX licence tags.
    Following discussion on linux-next, we believe our version to be more
    accurate than the one in the tree, so the resolution is to take our
    version for all the SPDX conflicts"

    Note on the SPDX license tag conversion conflicts: the SCSI tree had
    done its own SPDX conversion, which in some cases conflicted with the
    treewide ones done by Thomas & co.

    In almost all cases, the conflicts were purely syntactic: the SCSI tree
    used the old-style SPDX tags ("GPL-2.0" and "GPL-2.0+") while the
    treewide conversion had used the new-style ones ("GPL-2.0-only" and
    "GPL-2.0-or-later").

    In these cases I picked the new-style one.

    In a few cases, the SPDX conversion was actually different, though. As
    explained by James above, and in more detail in a pre-pull-request
    thread:

    "The other problem is actually substantive: In the libsas code Luben
    Tuikov originally specified gpl 2.0 only by dint of stating:

    * This file is licensed under GPLv2.

    In all the libsas files, but then muddied the water by quoting GPLv2
    verbatim (which includes the or later than language). So for these
    files Christoph did the conversion to v2 only SPDX tags and Thomas
    converted to v2 or later tags"

    So in those cases, where the spdx tag substantially mattered, I took the
    SCSI tree conversion of it, but then also took the opportunity to turn
    the old-style "GPL-2.0" into a new-style "GPL-2.0-only" tag.

    Similarly, when there were whitespace differences or other differences
    to the comments around the copyright notices, I took the version from
    the SCSI tree as being the more specific conversion.

    Finally, in the spdx conversions that had no conflicts (because the
    treewide ones hadn't been done for those files), I just took the SCSI
    tree version as-is, even if it was old-style. The old-style conversions
    are perfectly valid, even if the "-only" and "-or-later" versions are
    perhaps more descriptive.

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (185 commits)
    scsi: qla2xxx: move IO flush to the front of NVME rport unregistration
    scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition
    scsi: qla2xxx: on session delete, return nvme cmd
    scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices
    scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1
    scsi: megaraid_sas: Introduce various Aero performance modes
    scsi: megaraid_sas: Use high IOPS queues based on IO workload
    scsi: megaraid_sas: Set affinity for high IOPS reply queues
    scsi: megaraid_sas: Enable coalescing for high IOPS queues
    scsi: megaraid_sas: Add support for High IOPS queues
    scsi: megaraid_sas: Add support for MPI toolbox commands
    scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver
    scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura
    scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD
    scsi: megaraid_sas: Handle sequence JBOD map failure at driver level
    scsi: megaraid_sas: Don't send FPIO to RL Bypass queue
    scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault
    scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout
    scsi: megaraid_sas: Call disable_irq from process IRQ poll
    scsi: megaraid_sas: Remove few debug counters from IO path
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:
    "Some highlights from this development cycle:

    1) Big refactoring of ipv6 route and neigh handling to support
    nexthop objects configurable as units from userspace. From David
    Ahern.

    2) Convert explored_states in BPF verifier into a hash table,
    significantly decreased state held for programs with bpf2bpf
    calls, from Alexei Starovoitov.

    3) Implement bpf_send_signal() helper, from Yonghong Song.

    4) Various classifier enhancements to mvpp2 driver, from Maxime
    Chevallier.

    5) Add aRFS support to hns3 driver, from Jian Shen.

    6) Fix use after free in inet frags by allocating fqdirs dynamically
    and reworking how rhashtable dismantle occurs, from Eric Dumazet.

    7) Add act_ctinfo packet classifier action, from Kevin
    Darbyshire-Bryant.

    8) Add TFO key backup infrastructure, from Jason Baron.

    9) Remove several old and unused ISDN drivers, from Arnd Bergmann.

    10) Add devlink notifications for flash update status to mlxsw driver,
    from Jiri Pirko.

    11) Lots of kTLS offload infrastructure fixes, from Jakub Kicinski.

    12) Add support for mv88e6250 DSA chips, from Rasmus Villemoes.

    13) Various enhancements to ipv6 flow label handling, from Eric
    Dumazet and Willem de Bruijn.

    14) Support TLS offload in nfp driver, from Jakub Kicinski, Dirk van
    der Merwe, and others.

    15) Various improvements to axienet driver including converting it to
    phylink, from Robert Hancock.

    16) Add PTP support to sja1105 DSA driver, from Vladimir Oltean.

    17) Add mqprio qdisc offload support to dpaa2-eth, from Ioana
    Radulescu.

    18) Add devlink health reporting to mlx5, from Moshe Shemesh.

    19) Convert stmmac over to phylink, from Jose Abreu.

    20) Add PTP PHC (Physical Hardware Clock) support to mlxsw, from
    Shalom Toledo.

    21) Add nftables SYNPROXY support, from Fernando Fernandez Mancera.

    22) Convert tcp_fastopen over to use SipHash, from Ard Biesheuvel.

    23) Track spill/fill of constants in BPF verifier, from Alexei
    Starovoitov.

    24) Support bounded loops in BPF, from Alexei Starovoitov.

    25) Various page_pool API fixes and improvements, from Jesper Dangaard
    Brouer.

    26) Just like ipv4, support ref-countless ipv6 route handling. From
    Wei Wang.

    27) Support VLAN offloading in aquantia driver, from Igor Russkikh.

    28) Add AF_XDP zero-copy support to mlx5, from Maxim Mikityanskiy.

    29) Add flower GRE encap/decap support to nfp driver, from Pieter
    Jansen van Vuuren.

    30) Protect against stack overflow when using act_mirred, from John
    Hurley.

    31) Allow devmap map lookups from eBPF, from Toke Høiland-Jørgensen.

    32) Use page_pool API in netsec driver, Ilias Apalodimas.

    33) Add Google gve network driver, from Catherine Sullivan.

    34) More indirect call avoidance, from Paolo Abeni.

    35) Add kTLS TX HW offload support to mlx5, from Tariq Toukan.

    36) Add XDP_REDIRECT support to bnxt_en, from Andy Gospodarek.

    37) Add MPLS manipulation actions to TC, from John Hurley.

    38) Add sending a packet to connection tracking from TC actions, and
    then allow flower classifier matching on conntrack state. From
    Paul Blakey.

    39) Netfilter hw offload support, from Pablo Neira Ayuso"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2080 commits)
    net/mlx5e: Return in default case statement in tx_post_resync_params
    mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync().
    net: dsa: add support for BRIDGE_MROUTER attribute
    pkt_sched: Include const.h
    net: netsec: remove static declaration for netsec_set_tx_de()
    net: netsec: remove superfluous if statement
    netfilter: nf_tables: add hardware offload support
    net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload
    net: flow_offload: add flow_block_cb_is_busy() and use it
    net: sched: remove tcf block API
    drivers: net: use flow block API
    net: sched: use flow block API
    net: flow_offload: add flow_block_cb_{priv, incref, decref}()
    net: flow_offload: add list handling functions
    net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()
    net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
    net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND
    net: flow_offload: add flow_block_cb_setup_simple()
    net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC
    net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
    ...

    Linus Torvalds
     

07 Jul, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Two iscsi fixes.

    One for an oops in the client which can be triggered by the server
    authentication protocol and the other in the target code which causes
    data corruption"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not supported
    scsi: target/iblock: Fix overrun in WRITE SAME emulation

    Linus Torvalds
     

03 Jul, 2019

2 commits

  • If the CHAP_A value is not supported, the chap_server_open() function
    should free the auth_protocol pointer and set it to NULL, or we will leave
    a dangling pointer around.

    [ 66.010905] Unsupported CHAP_A value
    [ 66.011660] Security negotiation failed.
    [ 66.012443] iSCSI Login negotiation failed.
    [ 68.413924] general protection fault: 0000 [#1] SMP PTI
    [ 68.414962] CPU: 0 PID: 1562 Comm: targetcli Kdump: loaded Not tainted 4.18.0-80.el8.x86_64 #1
    [ 68.416589] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
    [ 68.417677] RIP: 0010:__kmalloc_track_caller+0xc2/0x210

    Signed-off-by: Maurizio Lombardi
    Reviewed-by: Chris Leech
    Signed-off-by: Martin K. Petersen

    Maurizio Lombardi
     
  • WRITE SAME corrupts data on the block device behind iblock if the command
    is emulated. The emulation code issues (M - 1) * N times more bios than
    requested, where M is the number of 512 blocks per real block size and N is
    the NUMBER OF LOGICAL BLOCKS specified in WRITE SAME command. So, for a
    device with 4k blocks, 7 * N more LBAs gets written after the requested
    range.

    The issue happens because the number of 512 byte sectors to be written is
    decreased one by one while the real bios are typically from 1 to 8 512 byte
    sectors per bio.

    Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
    Cc:
    Signed-off-by: Roman Bolshakov
    Reviewed-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Roman Bolshakov
     

22 Jun, 2019

1 commit


21 Jun, 2019

1 commit


19 Jun, 2019

2 commits

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Fix the following warning reported by coccicheck:

    drivers/target/iscsi/iscsi_target_nego.c:175:6-8: WARNING: possible
    condition with no effect (if == else)

    Signed-off-by: Hariprasad Kelam
    Reviewed-by: David Disseldorp
    Signed-off-by: Martin K. Petersen

    Hariprasad Kelam
     

18 Jun, 2019

1 commit


11 Jun, 2019

1 commit


05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms and conditions of the gnu general public license
    version 2 as published by the free software foundation this program
    is distributed in the hope it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 51 franklin st fifth floor boston ma 02110
    1301 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 111 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190530000436.567572064@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

2 commits

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit


18 May, 2019

1 commit

  • Currently, the Kbuild core manipulates header search paths in a crazy
    way [1].

    To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
    the search paths in the srctree. Some Makefiles are already written in
    that way, but not all. The goal of this work is to make the notation
    consistent, and finally get rid of the gross hacks.

    Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
    ("kbuild: do not drop -I without parameter").

    [1]: https://patchwork.kernel.org/patch/9632347/

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

09 May, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: qla2xxx, qedf, smartpqi,
    hpsa, lpfc, ufs, mpt3sas, ibmvfc and hisi_sas. Plus number of minor
    changes, spelling fixes and other trivia"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (298 commits)
    scsi: qla2xxx: Avoid that lockdep complains about unsafe locking in tcm_qla2xxx_close_session()
    scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory
    scsi: qla2xxx: Fix hardirq-unsafe locking
    scsi: qla2xxx: Complain loudly about reference count underflow
    scsi: qla2xxx: Use __le64 instead of uint32_t[2] for sending DMA addresses to firmware
    scsi: qla2xxx: Introduce the dsd32 and dsd64 data structures
    scsi: qla2xxx: Check the size of firmware data structures at compile time
    scsi: qla2xxx: Pass little-endian values to the firmware
    scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands
    scsi: qla2xxx: Use an on-stack completion in qla24xx_control_vp()
    scsi: qla2xxx: Make qla24xx_async_abort_cmd() static
    scsi: qla2xxx: Remove unnecessary locking from the target code
    scsi: qla2xxx: Remove qla_tgt_cmd.released
    scsi: qla2xxx: Complain if a command is released that is owned by the firmware
    scsi: qla2xxx: target: Fix offline port handling and host reset handling
    scsi: qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending()
    scsi: qla2xxx: Fix error handling in qlt_alloc_qfull_cmd()
    scsi: qla2xxx: Simplify qlt_send_term_imm_notif()
    scsi: qla2xxx: Fix use-after-free issues in qla2xxx_qpair_sp_free_dma()
    scsi: qla2xxx: Fix a qla24xx_enable_msix() error path
    ...

    Linus Torvalds