11 Sep, 2020

1 commit

  • I can't always remember the return values of these functions, and so I
    usually jump to the function to read the kernel-doc and see that it
    doesn't tell me. Then I have to spend more time reading the code to jump
    to the function that actually tells me the return values. Let's document
    it here so that we don't all have to spend time digging through the code
    to understand the return values.

    Cc:
    Signed-off-by: Stephen Boyd
    Link: https://lore.kernel.org/r/20200910060440.2302925-1-swboyd@chromium.org
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     

09 Sep, 2020

1 commit

  • This reverts commit 18efb2f9e897ac65e7a1b2892f4a53e404534eba as it is
    reported to break the build:
    https://lore.kernel.org/r/20200909154709.619fe9bb@canb.auug.org.au

    Reported-by: Stephen Rothwell
    Fixes: 18efb2f9e897 ("test_firmware: Test platform fw loading on non-EFI systems")
    Cc: stable@vger.kernel.org
    Cc: Luis Chamberlain
    Cc: Scott Branden
    Cc: Kees Cook
    Link: https://lore.kernel.org/r/20200909154709.619fe9bb@canb.auug.org.au
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Sep, 2020

7 commits

  • Use the managed variant of krealloc() and shrink the code a bit.

    Signed-off-by: Bartosz Golaszewski
    Acked-by: Jonathan Cameron
    Link: https://lore.kernel.org/r/20200824173859.4910-4-brgl@bgdev.pl
    Signed-off-by: Greg Kroah-Hartman

    Bartosz Golaszewski
     
  • Shrink pmbus code by using devm_hwmon_device_register_with_groups()
    and devm_krealloc() instead of their non-managed variants.

    Signed-off-by: Bartosz Golaszewski
    Acked-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20200824173859.4910-3-brgl@bgdev.pl
    Signed-off-by: Greg Kroah-Hartman

    Bartosz Golaszewski
     
  • Implement the managed variant of krealloc(). This function works with
    all memory allocated by devm_kmalloc() (or devres functions using it
    implicitly like devm_kmemdup(), devm_kstrdup() etc.).

    Managed realloc'ed chunks can be manually released with devm_kfree().

    Signed-off-by: Bartosz Golaszewski
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200824173859.4910-2-brgl@bgdev.pl
    Signed-off-by: Greg Kroah-Hartman

    Bartosz Golaszewski
     
  • The debug messages about what syscore suspend/resume hooks are called
    are only present if you have initcall debugging enabled. Let's move
    these messages to pm_pr_dbg() so that the syscore PM messages are
    included along with all the other PM debugging info that can be seen
    during suspend/resume debugging.

    Cc: "Rafael J. Wysocki"
    Signed-off-by: Stephen Boyd
    Link: https://lore.kernel.org/r/20200806214633.204472-1-swboyd@chromium.org
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     
  • Use the ktime_us_delta() helper to measure the driver probe time. Given the
    helpers already returns an s64 value, let's drop the unnecessary casting to
    s64 as well. There is no functional change.

    Signed-off-by: Zenghui Yu
    Link: https://lore.kernel.org/r/20200803033343.1178-1-yuzenghui@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    Zenghui Yu
     
  • On non-EFI systems, it wasn't possible to test the platform firmware
    loader because it will have never set "checked_fw" during __init.
    Instead, allow the test code to override this check. Additionally split
    the declarations into a private header file so it there is greater
    enforcement of the symbol visibility.

    Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform")
    Cc: stable@vger.kernel.org
    Reviewed-by: Luis Chamberlain
    Acked-by: Scott Branden
    Signed-off-by: Kees Cook
    Link: https://lore.kernel.org/r/20200729175845.1745471-2-keescook@chromium.org
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     
  • The function is now only a helper that searches the
    connection from device graph and then by checking if the
    supplied connection identifier matches a property that
    contains reference.

    Signed-off-by: Heikki Krogerus
    Link: https://lore.kernel.org/r/20200907120532.37611-2-heikki.krogerus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

07 Sep, 2020

3 commits


24 Aug, 2020

3 commits

  • Pull EFI fixes from Thomas Gleixner:

    - Enforce NX on RO data in mixed EFI mode

    - Destroy workqueue in an error handling path to prevent UAF

    - Stop argument parser at '--' which is the delimiter for init

    - Treat a NULL command line pointer as empty instead of dereferncing it
    unconditionally.

    - Handle an unterminated command line correctly

    - Cleanup the 32bit code leftovers and remove obsolete documentation

    * tag 'efi-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    Documentation: efi: remove description of efi=old_map
    efi/x86: Move 32-bit code into efi_32.c
    efi/libstub: Handle unterminated cmdline
    efi/libstub: Handle NULL cmdline
    efi/libstub: Stop parsing arguments at "--"
    efi: add missed destroy_workqueue when efisubsys_init fails
    efi/x86: Mark kernel rodata non-executable for mixed mode

    Linus Torvalds
     
  • Pull EDAC fix from Borislav Petkov:
    "A single fix correcting a reversed error severity determination check
    which lead to a recoverable error getting marked as fatal, by Tony
    Luck"

    * tag 'edac_urgent_for_v5.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
    EDAC/{i7core,sb,pnd2,skx}: Fix error event severity

    Linus Torvalds
     
  • Pull networking fixes from David Miller:
    "Nothing earth shattering here, lots of small fixes (f.e. missing RCU
    protection, bad ref counting, missing memset(), etc.) all over the
    place:

    1) Use get_file_rcu() in task_file iterator, from Yonghong Song.

    2) There are two ways to set remote source MAC addresses in macvlan
    driver, but only one of which validates things properly. Fix this.
    From Alvin Šipraga.

    3) Missing of_node_put() in gianfar probing, from Sumera
    Priyadarsini.

    4) Preserve device wanted feature bits across multiple netlink
    ethtool requests, from Maxim Mikityanskiy.

    5) Fix rcu_sched stall in task and task_file bpf iterators, from
    Yonghong Song.

    6) Avoid reset after device destroy in ena driver, from Shay
    Agroskin.

    7) Missing memset() in netlink policy export reallocation path, from
    Johannes Berg.

    8) Fix info leak in __smc_diag_dump(), from Peilin Ye.

    9) Decapsulate ECN properly for ipv6 in ipv4 tunnels, from Mark
    Tomlinson.

    10) Fix number of data stream negotiation in SCTP, from David Laight.

    11) Fix double free in connection tracker action module, from Alaa
    Hleihel.

    12) Don't allow empty NHA_GROUP attributes, from Nikolay Aleksandrov"

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits)
    net: nexthop: don't allow empty NHA_GROUP
    bpf: Fix two typos in uapi/linux/bpf.h
    net: dsa: b53: check for timeout
    tipc: call rcu_read_lock() in tipc_aead_encrypt_done()
    net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow
    net: sctp: Fix negotiation of the number of data streams.
    dt-bindings: net: renesas, ether: Improve schema validation
    gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
    hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit()
    hv_netvsc: Remove "unlikely" from netvsc_select_queue
    bpf: selftests: global_funcs: Check err_str before strstr
    bpf: xdp: Fix XDP mode when no mode flags specified
    selftests/bpf: Remove test_align leftovers
    tools/resolve_btfids: Fix sections with wrong alignment
    net/smc: Prevent kernel-infoleak in __smc_diag_dump()
    sfc: fix build warnings on 32-bit
    net: phy: mscc: Fix a couple of spelling mistakes "spcified" -> "specified"
    libbpf: Fix map index used in error message
    net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe()
    net: atlantic: Use readx_poll_timeout() for large timeout
    ...

    Linus Torvalds
     

23 Aug, 2020

3 commits

  • Pull s390 fixes from Vasily Gorbik:

    - a couple of fixes for storage key handling relevant for debugging

    - add cond_resched into potentially slow subchannels scanning loop

    - fixes for PF/VF linking and to ignore stale PCI configuration request
    events

    * tag 's390-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/pci: fix PF/VF linking on hot plug
    s390/pci: re-introduce zpci_remove_device()
    s390/pci: fix zpci_bus_link_virtfn()
    s390/ptrace: fix storage key handling
    s390/runtime_instrumentation: fix storage key handling
    s390/pci: ignore stale configuration request event
    s390/cio: add cond_resched() in the slow_eval_known_fn() loop

    Linus Torvalds
     
  • Pull SCSI fixes from James Bottomley:
    "23 fixes in 5 drivers (qla2xxx, ufs, scsi_debug, fcoe, zfcp). The bulk
    of the changes are in qla2xxx and ufs and all are mostly small and
    definitely don't impact the core"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits)
    Revert "scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe"
    Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command"
    scsi: qla2xxx: Fix null pointer access during disconnect from subsystem
    scsi: qla2xxx: Check if FW supports MQ before enabling
    scsi: qla2xxx: Fix WARN_ON in qla_nvme_register_hba
    scsi: qla2xxx: Allow ql2xextended_error_logging special value 1 to be set anytime
    scsi: qla2xxx: Reduce noisy debug message
    scsi: qla2xxx: Fix login timeout
    scsi: qla2xxx: Indicate correct supported speeds for Mezz card
    scsi: qla2xxx: Flush I/O on zone disable
    scsi: qla2xxx: Flush all sessions on zone disable
    scsi: qla2xxx: Use MBX_TOV_SECONDS for mailbox command timeout values
    scsi: scsi_debug: Fix scp is NULL errors
    scsi: zfcp: Fix use-after-free in request timeout handlers
    scsi: ufs: No need to send Abort Task if the task in DB was cleared
    scsi: ufs: Clean up completed request without interrupt notification
    scsi: ufs: Improve interrupt handling for shared interrupts
    scsi: ufs: Fix interrupt error message for shared interrupts
    scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel EHL
    scsi: ufs-mediatek: Fix incorrect time to wait link status
    ...

    Linus Torvalds
     
  • Pull devicetree fixes from Rob Herring:
    "Another set of DT fixes:

    - restore range parsing error check

    - workaround PCI range parsing with missing 'device_type' now
    required

    - correct description of 'phy-connection-type'

    - fix erroneous matching on 'snps,dw-pcie' by 'intel,lgm-pcie' schema

    - a couple of grammar and whitespace fixes

    - update Shawn Guo's email"

    * tag 'devicetree-fixes-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    dt-bindings: vendor-prefixes: Remove trailing whitespace
    dt-bindings: net: correct description of phy-connection-type
    dt-bindings: PCI: intel,lgm-pcie: Fix matching on all snps,dw-pcie instances
    of: address: Work around missing device_type property in pcie nodes
    dt: writing-schema: Miscellaneous grammar fixes
    dt-bindings: Use Shawn Guo's preferred e-mail for i.MX bindings
    of/address: check for invalid range.cpu_addr

    Linus Torvalds
     

22 Aug, 2020

6 commits

  • Pull RISC-V fixes from Palmer Dabbelt:

    - The CLINT driver has been split in two: one to handle the M-mode
    CLINT (memory mapped and used on NOMMU systems) and one to handle the
    S-mode CLINT (via SBI).

    - The addition of SiFive's drivers to rv32_defconfig

    * tag 'riscv-for-linus-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    riscv: Add SiFive drivers to rv32_defconfig
    dt-bindings: timer: Add CLINT bindings
    RISC-V: Remove CLINT related code from timer and arch
    clocksource/drivers: Add CLINT timer driver
    RISC-V: Add mechanism to provide custom IPI operations

    Linus Torvalds
     
  • Pull xen fixes from Juergen Gross:
    "One build fix and a minor fix for suppressing a useless warning when
    booting a Xen dom0 via UEFI"

    * tag 'for-linus-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    Fix build error when CONFIG_ACPI is not set/enabled:
    efi: avoid error message when booting under Xen

    Linus Torvalds
     
  • Pull power management fixes from Rafael Wysocki:
    "These fix a few issues in the operating performance points (OPP)
    framework.

    Specifics:

    - Fix re-enabling of resources in dev_pm_opp_set_rate() (Rajendra
    Nayak)

    - Fix OPP table reference counting in error paths (Stephen Boyd)"

    * tag 'pm-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    opp: Enable resources again if they were disabled earlier
    opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails
    opp: Put opp table in dev_pm_opp_set_rate() for empty tables

    Linus Torvalds
     
  • clang static analysis reports this problem

    b53_common.c:1583:13: warning: The left expression of the compound
    assignment is an uninitialized value. The computed value will
    also be garbage
    ent.port &= ~BIT(port);
    ~~~~~~~~ ^

    ent is set by a successful call to b53_arl_read(). Unsuccessful
    calls are caught by an switch statement handling specific returns.
    b32_arl_read() calls b53_arl_op_wait() which fails with the
    unhandled -ETIMEDOUT.

    So add -ETIMEDOUT to the switch statement. Because
    b53_arl_op_wait() already prints out a message, do not add another
    one.

    Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
    Signed-off-by: Tom Rix
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Tom Rix
     
  • Pull rdma fixes from Jason Gunthorpe:
    "One regression from 5.8 and a few bugs from earlier kernels:

    - Various spelling corrections in kernel prints

    - Bug fixes in hfi1 and bntx_re

    - Revert a 5.8 patch in hns

    - Batch update for Mellanox and Cumulus maintainers emails"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
    MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain
    Revert "RDMA/hns: Reserve one sge in order to avoid local length error"
    RDMA/hfi1: Correct an interlock issue for TID RDMA WRITE request
    RDMA/bnxt_re: Do not add user qps to flushlist
    RDMA/core: Fix spelling mistake "Could't" -> "Couldn't"
    RDMA/usnic: Fix spelling mistake "transistion" -> "transition"
    RDMA/hns: Fix spelling mistake "epmty" -> "empty"

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Regular fixes pull for rc2. Usual rc2 doesn't seem too busy, mainly
    i915 and amdgpu. I'd expect the usual uptick for rc3.

    amdgpu:
    - Fix allocation size
    - SR-IOV fixes
    - Vega20 SMU feature state caching fix
    - Fix custom pptable handling
    - Arcturus golden settings update
    - Several display fixes
    - Fixes for Navy Flounder
    - Misc display fixes
    - RAS fix

    amdkfd:
    - SDMA fix for renoir

    i915:
    - Fix device parameter usage for selftest mock i915 device
    - Fix LPSP capability debugfs NULL dereference
    - Fix buddy register pagemask table
    - Fix intel_atomic_check() non-negative return value
    - Fix selftests passing a random 0 into ilog2()
    - Fix TGL power well enable/disable ordering
    - Switch to PMU module refcounting
    - GVT fixes

    virtio:
    - Add missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()
    - Fix memory leak in virtio_gpu_cleanup_object()"

    * tag 'drm-fixes-2020-08-21' of git://anongit.freedesktop.org/drm/drm: (34 commits)
    Revert "drm/amdgpu: disable gfxoff for navy_flounder"
    drm/i915/tgl: Make sure TC-cold is blocked before enabling TC AUX power wells
    drm/i915/selftests: Avoid passing a random 0 into ilog2
    drm/i915: Fix wrong return value in intel_atomic_check()
    drm/i915: Update bw_buddy pagemask table
    drm/i915/display: Check for an LPSP encoder before dereferencing
    drm/i915: Copy default modparams to mock i915_device
    drm/i915: Provide the perf pmu.module
    drm/amd/display: fix pow() crashing when given base 0
    drm/amd/display: Reset scrambling on Test Pattern
    drm/amd/display: fix dcn3 wide timing dsc validation
    drm/amd/display: Fix DFPstate hang due to view port changed
    drm/amd/display: Assign correct left shift
    drm/amd/display: Call DMUB for eDP power control
    drm/amdkfd: fix the wrong sdma instance query for renoir
    drm/amdgpu: parse ta firmware for navy_flounder
    drm/amdgpu: fix NULL pointer access issue when unloading driver
    drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event()
    drm/amdgpu: disable gfxoff for navy_flounder
    drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal
    ...

    Linus Torvalds
     

21 Aug, 2020

10 commits

  • drm/i915 fixes for v5.9-rc2:
    - GVT fixes
    - Fix device parameter usage for selftest mock i915 device
    - Fix LPSP capability debugfs NULL dereference
    - Fix buddy register pagemask table
    - Fix intel_atomic_check() non-negative return value
    - Fix selftests passing a random 0 into ilog2()
    - Fix TGL power well enable/disable ordering
    - Switch to PMU module refcounting

    Signed-off-by: Dave Airlie
    From: Jani Nikula
    Link: https://patchwork.freedesktop.org/patch/msgid/87a6yp7jp3.fsf@intel.com

    Dave Airlie
     
  • amd-drm-fixes-5.9-2020-08-20:

    amdgpu:
    - Fixes for Navy Flounder
    - Misc display fixes
    - RAS fix

    amdkfd:
    - SDMA fix for renoir

    Signed-off-by: Dave Airlie
    From: Alex Deucher
    Link: https://patchwork.freedesktop.org/patch/msgid/20200820041938.3928-1-alexander.deucher@amd.com

    Dave Airlie
     
  • netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue
    or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the
    queue number, so the “skb->queue_mapping - 1” will be used. This may
    cause the last queue of VF not been used.

    Use skb_record_rx_queue() here, so that the skb_get_rx_queue() called
    later will get the correct queue number, and VF will be able to use
    all queues.

    Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
    Signed-off-by: Haiyang Zhang
    Signed-off-by: David S. Miller

    Haiyang Zhang
     
  • When using vf_ops->ndo_select_queue, the number of queues of VF is
    usually bigger than the synthetic NIC. This condition may happen
    often.
    Remove "unlikely" from the comparison of ndev->real_num_tx_queues.

    Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
    Signed-off-by: Haiyang Zhang
    Signed-off-by: David S. Miller

    Haiyang Zhang
     
  • Pull PCI fix from Bjorn Helgaas:
    "Fix P2PDMA build issue (Christoph Hellwig)"

    * tag 'pci-v5.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI/P2PDMA: Fix build without DMA ops

    Linus Torvalds
     
  • Truncation of DMA_BIT_MASK to 32-bit dma_addr_t is semantically safe,
    but the compiler was warning because it was happening implicitly.
    Insert explicit casts to suppress the warnings.

    Reported-by: Randy Dunlap
    Signed-off-by: Edward Cree
    Acked-by: Randy Dunlap # build-tested
    Signed-off-by: David S. Miller

    Edward Cree
     
  • There are a couple of spelling mistakes in comment text. Fix these.

    Signed-off-by: Kaige Li
    Signed-off-by: David S. Miller

    Kaige Li
     
  • Right now the RISC-V timer driver is convoluted to support:
    1. Linux RISC-V S-mode (with MMU) where it will use TIME CSR for
    clocksource and SBI timer calls for clockevent device.
    2. Linux RISC-V M-mode (without MMU) where it will use CLINT MMIO
    counter register for clocksource and CLINT MMIO compare register
    for clockevent device.

    We now have a separate CLINT timer driver which also provide CLINT
    based IPI operations so let's remove CLINT MMIO related code from
    arch/riscv directory and RISC-V timer driver.

    Signed-off-by: Anup Patel
    Tested-by: Emil Renner Berhing
    Acked-by: Daniel Lezcano
    Reviewed-by: Atish Patra
    Reviewed-by: Palmer Dabbelt
    Signed-off-by: Palmer Dabbelt

    Anup Patel
     
  • We add a separate CLINT timer driver for Linux RISC-V M-mode (i.e.
    RISC-V NoMMU kernel).

    The CLINT MMIO device provides three things:
    1. 64bit free running counter register
    2. 64bit per-CPU time compare registers
    3. 32bit per-CPU inter-processor interrupt registers

    Unlike other timer devices, CLINT provides IPI registers along with
    timer registers. To use CLINT IPI registers, the CLINT timer driver
    provides IPI related callbacks to arch/riscv.

    Signed-off-by: Anup Patel
    Tested-by: Emil Renner Berhing
    Acked-by: Daniel Lezcano
    Reviewed-by: Atish Patra
    Reviewed-by: Palmer Dabbelt
    Signed-off-by: Palmer Dabbelt

    Anup Patel
     
  • Pull dma-mapping fixes from Christoph Hellwig:
    "Fix more fallout from the dma-pool changes (Nicolas Saenz Julienne,
    me)"

    * tag 'dma-mapping-5.9-1' of git://git.infradead.org/users/hch/dma-mapping:
    dma-pool: Only allocate from CMA when in same memory zone
    dma-pool: fix coherent pool allocations for IOMMU mappings

    Linus Torvalds
     

20 Aug, 2020

6 commits

  • This patch caused some issues on SEND operation, and it should be reverted
    to make the drivers work correctly. There will be a better solution that
    has been tested carefully to solve the original problem.

    This reverts commit 711195e57d341e58133d92cf8aaab1db24e4768d.

    Fixes: 711195e57d34 ("RDMA/hns: Reserve one sge in order to avoid local length error")
    Link: https://lore.kernel.org/r/1597829984-20223-1-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li
    Signed-off-by: Jason Gunthorpe

    Weihang Li
     
  • The following message occurs when running an AI application with TID RDMA
    enabled:

    hfi1 0000:7f:00.0: hfi1_0: [QP74] hfi1_tid_timeout 4084
    hfi1 0000:7f:00.0: hfi1_0: [QP70] hfi1_tid_timeout 4084

    The issue happens when TID RDMA WRITE request is followed by an
    IB_WR_RDMA_WRITE_WITH_IMM request, the latter could be completed first on
    the responder side. As a result, no ACK packet for the latter could be
    sent because the TID RDMA WRITE request is still being processed on the
    responder side.

    When the TID RDMA WRITE request is eventually completed, the requester
    will wait for the IB_WR_RDMA_WRITE_WITH_IMM request to be acknowledged.

    If the next request is another TID RDMA WRITE request, no TID RDMA WRITE
    DATA packet could be sent because the preceding IB_WR_RDMA_WRITE_WITH_IMM
    request is not completed yet.

    Consequently the IB_WR_RDMA_WRITE_WITH_IMM will be retried but it will be
    ignored on the responder side because the responder thinks it has already
    been completed. Eventually the retry will be exhausted and the qp will be
    put into error state on the requester side. On the responder side, the TID
    resource timer will eventually expire because no TID RDMA WRITE DATA
    packets will be received for the second TID RDMA WRITE request. There is
    also risk of a write-after-write memory corruption due to the issue.

    Fix by adding a requester side interlock to prevent any potential data
    corruption and TID RDMA protocol error.

    Fixes: a0b34f75ec20 ("IB/hfi1: Add interlock between a TID RDMA request and other requests")
    Link: https://lore.kernel.org/r/20200811174931.191210.84093.stgit@awfm-01.aw.intel.com
    Cc: # 5.4.x+
    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Kaike Wan
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Jason Gunthorpe

    Kaike Wan
     
  • Driver shall add only the kernel qps to the flush list for clean up.
    During async error events from the HW, driver is adding qps to this list
    without checking if the qp is kernel qp or not.

    Add a check to avoid user qp addition to the flush list.

    Fixes: 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing")
    Fixes: c50866e2853a ("bnxt_re: fix the regression due to changes in alloc_pbl")
    Link: https://lore.kernel.org/r/1596689148-4023-1-git-send-email-selvin.xavier@broadcom.com
    Signed-off-by: Selvin Xavier
    Signed-off-by: Jason Gunthorpe

    Selvin Xavier
     
  • There is a spelling mistake in a pr_warn message. Fix it.

    Link: https://lore.kernel.org/r/20200810075824.46770-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King
    Signed-off-by: Jason Gunthorpe

    Colin Ian King
     
  • Make the command line parsing more robust, by handling the case it is
    not NUL-terminated.

    Use strnlen instead of strlen, and make sure that the temporary copy is
    NUL-terminated before parsing.

    Cc:
    Signed-off-by: Arvind Sankar
    Link: https://lore.kernel.org/r/20200813185811.554051-4-nivedita@alum.mit.edu
    Signed-off-by: Ard Biesheuvel

    Arvind Sankar
     
  • Treat a NULL cmdline the same as empty. Although this is unlikely to
    happen in practice, the x86 kernel entry does check for NULL cmdline and
    handles it, so do it here as well.

    Cc:
    Signed-off-by: Arvind Sankar
    Link: https://lore.kernel.org/r/20200729193300.598448-1-nivedita@alum.mit.edu
    Signed-off-by: Ard Biesheuvel

    Arvind Sankar