Skip to content
  1. Aug 25, 2021
    • Li Jinlin's avatar
      scsi: core: Fix hang of freezing queue between blocking and running device · 02c6dcd5
      Li Jinlin authored
      We found a hang, the steps to reproduce  are as follows:
      
        1. blocking device via scsi_device_set_state()
      
        2. dd if=/dev/sda of=/mnt/t.log bs=1M count=10
      
        3. echo none > /sys/block/sda/queue/scheduler
      
        4. echo "running" >/sys/block/sda/device/state
      
      Step 3 and 4 should complete after step 4, but they hang.
      
        CPU#0               CPU#1                CPU#2
        ---------------     ----------------     ----------------
                                                 Step 1: blocking device
      
                                                 Step 2: dd xxxx
                                                        ^^^^^^ get request
                                                               q_usage_counter++
      
                            Step 3: switching scheculer
                            elv_iosched_store
                              elevator_switch
                                blk_mq_freeze_queue
                                  blk_freeze_queue
                                    > blk_freeze_queue_start
                                      ^^^^^^ mq_freeze_depth++
      
                                    > blk_mq_run_hw_queues
                                      ^^^^^^ can't run queue when dev blocked
      
                                    > blk_mq_freeze_queue_wait
                                      ^^^^^^ Hang here!!!
                                             wait q_usage_counter==0
      
        Step 4: running device
        store_state_field
          scsi_rescan_device
            scsi_attach_vpd
              scsi_vpd_inquiry
                __scsi_execute
                  blk_get_request
                    blk_mq_alloc_request
                      blk_queue_enter
                      ^^^^^^ Hang here!!!
                             wait mq_freeze_depth==0
      
          blk_mq_run_hw_queues
          ^^^^^^ dispatch IO, q_usage_counter will reduce to zero
      
                                  blk_mq_unfreeze_queue
                                  ^^^^^ mq_freeze_depth--
      
      To fix this, we need to run queue before rescanning device when the device
      state changes to SDEV_RUNNING.
      
      Link: https://lore.kernel.org/r/20210824025921.3277629-1-lijinlin3@huawei.com
      Fixes: f0f82e24
      
       ("scsi: core: Fix capacity set to zero after offlinining device")
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarLi Jinlin <lijinlin3@huawei.com>
      Signed-off-by: default avatarQiu Laibin <qiulaibin@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      02c6dcd5
  2. Aug 10, 2021
    • Colin Ian King's avatar
      scsi: mpt3sas: Fix incorrectly assigned error return and check · 40d32727
      Colin Ian King authored
      Currently the call to _base_static_config_pages() is assigning the error
      return to variable 'rc' but checking the error return in error 'r'. Fix
      this by assigning the error return to variable 'r' instead of 'rc'.
      
      Link: https://lore.kernel.org/r/20210804134940.114011-1-colin.king@canonical.com
      Fixes: 19a622c3
      
       ("scsi: mpt3sas: Handle firmware faults during first half of IOC init")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Addresses-Coverity: ("Unused value")
      40d32727
    • Michael Kelley's avatar
      scsi: storvsc: Log TEST_UNIT_READY errors as warnings · dbe7633c
      Michael Kelley authored
      Commit 08f76547 ("scsi: storvsc: Update error logging") added more
      robust logging of errors, particularly those reported as Hyper-V
      errors. But this change produces extra logging noise in that
      TEST_UNIT_READY may report errors during the normal course of detecting
      device adds and removes.
      
      Fix this by logging TEST_UNIT_READY errors as warnings, so that log lines
      are produced only if the storvsc log level is changed to WARN level on the
      kernel boot line.
      
      Link: https://lore.kernel.org/r/1628269970-87876-1-git-send-email-mikelley@microsoft.com
      Fixes: 08f76547
      
       ("scsi: storvsc: Update error logging")
      Signed-off-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      dbe7633c
    • Ewan D. Milne's avatar
      scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash · 9977d880
      Ewan D. Milne authored
      The phba->poll_list is traversed in case of an error in
      lpfc_sli4_hba_setup(), so it must be initialized earlier in case the error
      path is taken.
      
      [  490.030738] lpfc 0000:65:00.0: 0:1413 Failed to init iocb list.
      [  490.036661] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
      [  490.044485] PGD 0 P4D 0
      [  490.047027] Oops: 0000 [#1] SMP PTI
      [  490.050518] CPU: 0 PID: 7 Comm: kworker/0:1 Kdump: loaded Tainted: G          I      --------- -  - 4.18.
      [  490.060511] Hardware name: Dell Inc. PowerEdge R440/0WKGTH, BIOS 1.4.8 05/22/2018
      [  490.067994] Workqueue: events work_for_cpu_fn
      [  490.072371] RIP: 0010:lpfc_sli4_cleanup_poll_list+0x20/0xb0 [lpfc]
      [  490.078546] Code: cf e9 04 f7 fe ff 0f 1f 40 00 0f 1f 44 00 00 41 57 49 89 ff 41 56 41 55 41 54 4d 8d a79
      [  490.097291] RSP: 0018:ffffbd1a463dbcc8 EFLAGS: 00010246
      [  490.102518] RAX: 0000000000008200 RBX: ffff945cdb8c0000 RCX: 0000000000000000
      [  490.109649] RDX: 0000000000018200 RSI: ffff9468d0e16818 RDI: 0000000000000000
      [  490.116783] RBP: ffff945cdb8c1740 R08: 00000000000015c5 R09: 0000000000000042
      [  490.123915] R10: 0000000000000000 R11: ffffbd1a463dbab0 R12: ffff945cdb8c25c0
      [  490.131049] R13: 00000000fffffff4 R14: 0000000000001800 R15: ffff945cdb8c0000
      [  490.138182] FS:  0000000000000000(0000) GS:ffff9468d0e00000(0000) knlGS:0000000000000000
      [  490.146267] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  490.152013] CR2: 0000000000000000 CR3: 000000042ca10002 CR4: 00000000007706f0
      [  490.159146] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  490.166277] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  490.173409] PKRU: 55555554
      [  490.176123] Call Trace:
      [  490.178598]  lpfc_sli4_queue_destroy+0x7f/0x3c0 [lpfc]
      [  490.183745]  lpfc_sli4_hba_setup+0x1bc7/0x23e0 [lpfc]
      [  490.188797]  ? kernfs_activate+0x63/0x80
      [  490.192721]  ? kernfs_add_one+0xe7/0x130
      [  490.196647]  ? __kernfs_create_file+0x80/0xb0
      [  490.201020]  ? lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc]
      [  490.206944]  lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc]
      [  490.212697]  lpfc_pci_probe_one+0x179/0xb70 [lpfc]
      [  490.217492]  local_pci_probe+0x41/0x90
      [  490.221246]  work_for_cpu_fn+0x16/0x20
      [  490.224994]  process_one_work+0x1a7/0x360
      [  490.229009]  ? create_worker+0x1a0/0x1a0
      [  490.232933]  worker_thread+0x1cf/0x390
      [  490.236687]  ? create_worker+0x1a0/0x1a0
      [  490.240612]  kthread+0x116/0x130
      [  490.243846]  ? kthread_flush_work_fn+0x10/0x10
      [  490.248293]  ret_from_fork+0x35/0x40
      [  490.251869] Modules linked in: lpfc(+) xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4i
      [  490.332609] CR2: 0000000000000000
      
      Link: https://lore.kernel.org/r/20210809150947.18104-1-emilne@redhat.com
      Fixes: 93a4d6f4
      
       ("scsi: lpfc: Add registration for CPU Offline/Online events")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarJames Smart <jsmart2021@gmail.com>
      Signed-off-by: default avatarEwan D. Milne <emilne@redhat.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9977d880
  3. Jul 30, 2021
    • lijinlin's avatar
      scsi: core: Fix capacity set to zero after offlinining device · f0f82e24
      lijinlin authored
      After adding physical volumes to a volume group through vgextend, the
      kernel will rescan the partitions. This in turn will cause the device
      capacity to be queried.
      
      If the device status is set to offline through sysfs at this time, READ
      CAPACITY command will return a result which the host byte is
      DID_NO_CONNECT, and the capacity of the device will be set to zero in
      read_capacity_error(). After setting device status back to running, the
      capacity of the device will remain stuck at zero.
      
      Fix this issue by rescanning device when the device state changes to
      SDEV_RUNNING.
      
      Link: https://lore.kernel.org/r/20210727034455.1494960-1-lijinlin3@huawei.com
      
      
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarlijinlin <lijinlin3@huawei.com>
      Signed-off-by: default avatarWu Bo <wubo40@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f0f82e24
    • Li Manyi's avatar
      scsi: sr: Return correct event when media event code is 3 · 5c04243a
      Li Manyi authored
      Media event code 3 is defined in the MMC-6 spec as follows:
      
        "MediaRemoval: The media has been removed from the specified slot, and
         the Drive is unable to access the media without user intervention. This
         applies to media changers only."
      
      This indicated that treating the condition as an EJECT_REQUEST was
      appropriate. However, doing so had the unfortunate side-effect of causing
      the drive tray to be physically ejected on resume. Instead treat the event
      as a MEDIA_CHANGE request.
      
      Fixes: 7dd753ca ("scsi: sr: Return appropriate error code when disk is ejected")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=213759
      Link: https://lore.kernel.org/r/20210726114913.6760-1-limanyi@uniontech.com
      
      
      Signed-off-by: default avatarLi Manyi <limanyi@uniontech.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      5c04243a
    • Tyrel Datwyler's avatar
      scsi: ibmvfc: Fix command state accounting and stale response detection · a264cf5e
      Tyrel Datwyler authored
      Prior to commit 1f4a4a19 ("scsi: ibmvfc: Complete commands outside the
      host/queue lock") responses to commands were completed sequentially with
      the host lock held such that a command had a basic binary state of active
      or free. It was therefore a simple affair of ensuring the assocaiated
      ibmvfc_event to a VIOS response was valid by testing that it was not
      already free. The lock relexation work to complete commands outside the
      lock inadverdently made it a trinary command state such that a command is
      either in flight, received and being completed, or completed and now
      free. This breaks the stale command detection logic as a command may be
      still marked active and been placed on the delayed completion list when a
      second stale response for the same command arrives. This can lead to double
      completions and list corruption. This issue was exposed by a recent VIOS
      regression were a missing memory barrier could occasionally result in the
      ibmvfc client receiving a duplicate response for the same command.
      
      Fix the issue by introducing the atomic ibmvfc_event.active to track the
      trinary state of a command. The state is explicitly set to 1 when a command
      is successfully sent. The CRQ response handlers use
      atomic_dec_if_positive() to test for stale responses and correctly
      transition to the completion state when a active command is received.
      Finally, atomic_dec_and_test() is used to sanity check transistions when
      commands are freed as a result of a completion, or moved to the purge list
      as a result of error handling or adapter reset.
      
      Link: https://lore.kernel.org/r/20210716205220.1101150-1-tyreld@linux.ibm.com
      Fixes: 1f4a4a19
      
       ("scsi: ibmvfc: Complete commands outside the host/queue lock")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a264cf5e
    • Sreekanth Reddy's avatar
      scsi: core: Avoid printing an error if target_alloc() returns -ENXIO · 70edd2e6
      Sreekanth Reddy authored
      Avoid printing a 'target allocation failed' error if the driver
      target_alloc() callback function returns -ENXIO. This return value
      indicates that the corresponding H:C:T:L entry is empty.
      
      Removing this error reduces the scan time if the user issues SCAN_WILD_CARD
      scan operation through sysfs parameter on a host with a lot of empty
      H:C:T:L entries.
      
      Avoiding the printk on -ENXIO matches the behavior of the other callback
      functions during scanning.
      
      Link: https://lore.kernel.org/r/20210726115402.1936-1-sreekanth.reddy@broadcom.com
      
      
      Signed-off-by: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      70edd2e6
    • Ye Bin's avatar
      scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() · bc546c0c
      Ye Bin authored
      The following BUG_ON() was observed during RDAC scan:
      
      [595952.944297] kernel BUG at drivers/scsi/device_handler/scsi_dh_rdac.c:427!
      [595952.951143] Internal error: Oops - BUG: 0 [#1] SMP
      ......
      [595953.251065] Call trace:
      [595953.259054]  check_ownership+0xb0/0x118
      [595953.269794]  rdac_bus_attach+0x1f0/0x4b0
      [595953.273787]  scsi_dh_handler_attach+0x3c/0xe8
      [595953.278211]  scsi_dh_add_device+0xc4/0xe8
      [595953.282291]  scsi_sysfs_add_sdev+0x8c/0x2a8
      [595953.286544]  scsi_probe_and_add_lun+0x9fc/0xd00
      [595953.291142]  __scsi_scan_target+0x598/0x630
      [595953.295395]  scsi_scan_target+0x120/0x130
      [595953.299481]  fc_user_scan+0x1a0/0x1c0 [scsi_transport_fc]
      [595953.304944]  store_scan+0xb0/0x108
      [595953.308420]  dev_attr_store+0x44/0x60
      [595953.312160]  sysfs_kf_write+0x58/0x80
      [595953.315893]  kernfs_fop_write+0xe8/0x1f0
      [595953.319888]  __vfs_write+0x60/0x190
      [595953.323448]  vfs_write+0xac/0x1c0
      [595953.326836]  ksys_write+0x74/0xf0
      [595953.330221]  __arm64_sys_write+0x24/0x30
      
      Code is in check_ownership:
      
      	list_for_each_entry_rcu(tmp, &h->ctlr->dh_list, node) {
      		/* h->sdev should always be valid */
      		BUG_ON(!tmp->sdev);
      		tmp->sdev->access_state = access_state;
      	}
      
      	rdac_bus_attach
      		initialize_controller
      			list_add_rcu(&h->node, &h->ctlr->dh_list);
      			h->sdev = sdev;
      
      	rdac_bus_detach
      		list_del_rcu(&h->node);
      		h->sdev = NULL;
      
      Fix the race between rdac_bus_attach() and rdac_bus_detach() where h->sdev
      is NULL when processing the RDAC attach.
      
      Link: https://lore.kernel.org/r/20210113063103.2698953-1-yebin10@huawei.com
      
      
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      bc546c0c
  4. Jul 29, 2021
  5. Jul 21, 2021
    • David Disseldorp's avatar
      scsi: target: Fix NULL dereference on XCOPY completion · a47fa413
      David Disseldorp authored
      CPU affinity control added with commit 39ae3edd ("scsi: target: core:
      Make completion affinity configurable") makes target_complete_cmd() queue
      work on a CPU based on se_tpg->se_tpg_wwn->cmd_compl_affinity state.
      
      LIO's EXTENDED COPY worker is a special case in that read/write cmds are
      dispatched using the global xcopy_pt_tpg, which carries a NULL se_tpg_wwn
      pointer following initialization in target_xcopy_setup_pt().
      
      The NULL xcopy_pt_tpg->se_tpg_wwn pointer is dereferenced on completion of
      any EXTENDED COPY initiated read/write cmds. E.g using the libiscsi
      SCSI.ExtendedCopy.Simple test:
      
        BUG: kernel NULL pointer dereference, address: 00000000000001a8
        RIP: 0010:target_complete_cmd+0x9d/0x130 [target_core_mod]
        Call Trace:
         fd_execute_rw+0x148/0x42a [target_core_file]
         ? __dynamic_pr_debug+0xa7/0xe0
         ? target_check_reservation+0x5b/0x940 [target_core_mod]
         __target_execute_cmd+0x1e/0x90 [target_core_mod]
         transport_generic_new_cmd+0x17c/0x330 [target_core_mod]
         target_xcopy_issue_pt_cmd+0x9/0x60 [target_core_mod]
         target_xcopy_read_source.isra.7+0x10b/0x1b0 [target_core_mod]
         ? target_check_fua+0x40/0x40 [target_core_mod]
         ? transport_complete_task_attr+0x130/0x130 [target_core_mod]
         target_xcopy_do_work+0x61f/0xc00 [target_core_mod]
      
      This fix makes target_complete_cmd() queue work on se_cmd->cpuid if
      se_tpg_wwn is NULL.
      
      Link: https://lore.kernel.org/r/20210720225522.26291-1-ddiss@suse.de
      Fixes: 39ae3edd
      
       ("scsi: target: core: Make completion affinity configurable")
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: Mike Christie <michael.christie@oracle.com>
      Reviewed-by: default avatarMike Christie <michael.christie@oracle.com>
      Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a47fa413
  6. Jul 20, 2021
  7. Jul 19, 2021
  8. Jul 13, 2021
  9. Jul 12, 2021
    • Linus Torvalds's avatar
      Linux 5.14-rc1 · e73f0f0e
      Linus Torvalds authored
      v5.14-rc1
      e73f0f0e
    • Hugh Dickins's avatar
      mm/rmap: try_to_migrate() skip zone_device !device_private · 6c855fce
      Hugh Dickins authored
      
      
      I know nothing about zone_device pages and !device_private pages; but if
      try_to_migrate_one() will do nothing for them, then it's better that
      try_to_migrate() filter them first, than trawl through all their vmas.
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Link: https://lore.kernel.org/lkml/1241d356-8ec9-f47b-a5ec-9b2bf66d242@google.com/
      
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c855fce
    • Hugh Dickins's avatar
      mm/rmap: fix new bug: premature return from page_mlock_one() · 023e1a8d
      Hugh Dickins authored
      In the unlikely race case that page_mlock_one() finds VM_LOCKED has been
      cleared by the time it got page table lock, page_vma_mapped_walk_done()
      must be called before returning, either explicitly, or by a final call
      to page_vma_mapped_walk() - otherwise the page table remains locked.
      
      Fixes: cd62734c
      
       ("mm/rmap: split try_to_munlock from try_to_unmap")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/lkml/20210711151446.GB4070@xsang-OptiPlex-9020/
      Link: https://lore.kernel.org/lkml/f71f8523-cba7-3342-40a7-114abc5d1f51@google.com/
      
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      023e1a8d
    • Hugh Dickins's avatar
      mm/rmap: fix old bug: munlocking THP missed other mlocks · d9770fcc
      Hugh Dickins authored
      The kernel recovers in due course from missing Mlocked pages: but there
      was no point in calling page_mlock() (formerly known as
      try_to_munlock()) on a THP, because nothing got done even when it was
      found to be mapped in another VM_LOCKED vma.
      
      It's true that we need to be careful: Mlocked accounting of pte-mapped
      THPs is too difficult (so consistently avoided); but Mlocked accounting
      of only-pmd-mapped THPs is supposed to work, even when multiple mappings
      are mlocked and munlocked or munmapped.  Refine the tests.
      
      There is already a VM_BUG_ON_PAGE(PageDoubleMap) in page_mlock(), so
      page_mlock_one() does not even have to worry about that complication.
      
      (I said the kernel recovers: but would page reclaim be likely to split
      THP before rediscovering that it's VM_LOCKED? I've not followed that up)
      
      Fixes: 9a73f61b
      
       ("thp, mlock: do not mlock PTE-mapped file huge pages")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Link: https://lore.kernel.org/lkml/cfa154c-d595-406-eb7d-eb9df730f944@google.com/
      
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alistair Popple <apopple@nvidia.com>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d9770fcc
    • Hugh Dickins's avatar
      mm/rmap: fix comments left over from recent changes · 64b586d1
      Hugh Dickins authored
      
      
      Parallel developments in mm/rmap.c have left behind some out-of-date
      comments: try_to_migrate_one() also accepts TTU_SYNC (already commented
      in try_to_migrate() itself), and try_to_migrate() returns nothing at
      all.
      
      TTU_SPLIT_FREEZE has just been deleted, so reword the comment about it
      in mm/huge_memory.c; and TTU_IGNORE_ACCESS was removed in 5.11, so
      delete the "recently referenced" comment from try_to_unmap_one() (once
      upon a time the comment was near the removed codeblock, but they drifted
      apart).
      
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Link: https://lore.kernel.org/lkml/563ce5b2-7a44-5b4d-1dfd-59a0e65932a9@google.com/
      
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64b586d1
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98f7fdce
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "Two fixes:
      
         - Fix a MIPS IRQ handling RCU bug
      
         - Remove a DocBook annotation for a parameter that doesn't exist
           anymore"
      
      * tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry
        genirq/irqdesc: Drop excess kernel-doc entry @lookup
      98f7fdce
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 877029d9
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Three fixes:
      
         - Fix load tracking bug/inconsistency
      
         - Fix a sporadic CFS bandwidth constraints enforcement bug
      
         - Fix a uclamp utilization tracking bug for newly woken tasks"
      
      * tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/uclamp: Ignore max aggregation if rq is idle
        sched/fair: Fix CFS bandwidth hrtimer expiry type
        sched/fair: Sync load_sum with load_avg after dequeue
      877029d9
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 936b664f
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "A fix and a hardware-enablement addition:
      
         - Robustify uncore_snbep's skx_iio_set_mapping()'s error cleanup
      
         - Add cstate event support for Intel ICELAKE_X and ICELAKE_D"
      
      * tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel/uncore: Clean up error handling path of iio mapping
        perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support
      936b664f
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 301c8b1d
      Linus Torvalds authored
      Pull locking fixes from Ingo Molnar:
      
       - Fix a Sparc crash
      
       - Fix a number of objtool warnings
      
       - Fix /proc/lockdep output on certain configs
      
       - Restore a kprobes fail-safe
      
      * tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/atomic: sparc: Fix arch_cmpxchg64_local()
        kprobe/static_call: Restore missing static_call_text_reserved()
        static_call: Fix static_call_text_reserved() vs __init
        jump_label: Fix jump_label_text_reserved() vs __init
        locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING
      301c8b1d
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8b9cc17a
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is a set of minor fixes and clean ups in the core and various
        drivers.
      
        The only core change in behaviour is the I/O retry for spinup notify,
        but that shouldn't impact anything other than the failing case"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits)
        scsi: virtio_scsi: Add validation for residual bytes from response
        scsi: ipr: System crashes when seeing type 20 error
        scsi: core: Retry I/O for Notify (Enable Spinup) Required error
        scsi: mpi3mr: Fix warnings reported by smatch
        scsi: qedf: Add check to synchronize abort and flush
        scsi: MAINTAINERS: Add mpi3mr driver maintainers
        scsi: libfc: Fix array index out of bound exception
        scsi: mvsas: Use DEVICE_ATTR_RO()/RW() macro
        scsi: megaraid_mbox: Use DEVICE_ATTR_ADMIN_RO() macro
        scsi: qedf: Use DEVICE_ATTR_RO() macro
        scsi: qedi: Use DEVICE_ATTR_RO() macro
        scsi: message: mptfc: Switch from pci_ to dma_ API
        scsi: be2iscsi: Fix some missing space in some messages
        scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
        scsi: ufs: Fix build warning without CONFIG_PM
        scsi: bnx2fc: Remove meaningless bnx2fc_abts_cleanup() return value assignment
        scsi: qla2xxx: Add heartbeat check
        scsi: virtio_scsi: Do not overwrite SCSI status
        scsi: libsas: Add LUN number check in .slave_alloc callback
        scsi: core: Inline scsi_mq_alloc_queue()
        ...
      8b9cc17a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.14-2021-07-10' of... · b1412bd7
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tool updates from Arnaldo Carvalho de Melo:
       "New features:
      
         - Enable use of BPF counters with 'perf stat --for-each-cgroup',
           using per-CPU 'cgroup-switch' events with an attached BPF program
           that does aggregation per-cgroup in the kernel instead of using
           per-cgroup perf events.
      
         - Add Topdown metrics L2 events as default events in 'perf stat' for
           systems having those events.
      
        Hardware tracing:
      
         - Add a config for max loops without consuming a packet in the Intel
           PT packet decoder, set via 'perf config intel-pt.max-loops=N'
      
        Hardware enablement:
      
         - Disable misleading NMI watchdog message in 'perf stat' on hybrid
           systems such as Intel Alder Lake.
      
         - Add a dummy event on hybrid systems to collect metadata records.
      
         - Add 24x7 nest metric events for the Power10 platform.
      
        Fixes:
      
         - Fix event parsing for PMUs starting with the same prefix.
      
         - Fix the 'perf trace' 'trace' alias installation dir.
      
         - Fix buffer size to report iregs in perf script python scripts,
           supporting the extended registers in PowerPC.
      
         - Fix overflow in elf_sec__is_text().
      
         - Fix 's' on source line when disasm is empty in the annotation TUI,
           accessible via 'perf annotate', 'perf report' and 'perf top'.
      
         - Plug leaks in scandir() returned dirent entries in 'perf test' when
           sorting the shell tests.
      
         - Fix --task and --stat with pipe input in 'perf report'.
      
         - Fix 'perf probe' use of debuginfo files by build id.
      
         - If a DSO has both dynsym and symtab ELF sections, read from both
           when loading the symbol table, fixing a problem processing Fedora
           32 glibc DSOs.
      
        Libraries:
      
         - Add grouping of events to libperf, from code in tools/perf,
           allowing libperf users to use that mode.
      
        Misc:
      
         - Filter plt stubs from the 'perf probe --functions' output.
      
         - Update UAPI header copies for asound, DRM, mman-common.h and the
           ones affected by the quotactl_fd syscall"
      
      * tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (29 commits)
        perf test: Add free() calls for scandir() returned dirent entries
        libperf: Add tests for perf_evlist__set_leader()
        libperf: Remove BUG_ON() from library code in get_group_fd()
        libperf: Add group support to perf_evsel__open()
        perf tools: Fix pattern matching for same substring in different PMU type
        perf record: Add a dummy event on hybrid systems to collect metadata records
        perf stat: Add Topdown metrics L2 events as default events
        libperf: Adopt evlist__set_leader() from tools/perf as perf_evlist__set_leader()
        libperf: Move 'nr_groups' from tools/perf to evlist::nr_groups
        libperf: Move 'leader' from tools/perf to perf_evsel::leader
        libperf: Move 'idx' from tools/perf to perf_evsel::idx
        libperf: Change tests to single static and shared binaries
        perf intel-pt: Add a config for max loops without consuming a packet
        perf stat: Disable the NMI watchdog message on hybrid
        perf vendor events power10: Adds 24x7 nest metric events for power10 platform
        perf script python: Fix buffer size to report iregs in perf script
        perf trace: Fix the perf trace link location
        perf top: Fix overflow in elf_sec__is_text()
        perf annotate: Fix 's' on source line when disasm is empty
        perf probe: Do not show @plt function by default
        ...
      b1412bd7
  10. Jul 11, 2021
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · de554096
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Mostly documentation/comment changes and non urgent fixes.
      
         - add or fix SPDX identifiers
      
         - NXP pcf*: fix datasheet URLs
      
         - imxdi: add wakeup support
      
         - pcf2127: handle timestamp interrupts, this fixes a possible
           interrupt storm
      
         - bd70528: Drop BD70528 support"
      
      * tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits)
        rtc: pcf8523: rename register and bit defines
        rtc: pcf2127: handle timestamp interrupts
        rtc: at91sam9: Remove unnecessary offset variable checks
        rtc: s5m: Check return value of s5m_check_peding_alarm_interrupt()
        rtc: spear: convert to SPDX identifier
        rtc: tps6586x: convert to SPDX identifier
        rtc: tps80031: convert to SPDX identifier
        rtc: rtd119x: Fix format of SPDX identifier
        rtc: sc27xx: Fix format of SPDX identifier
        rtc: palmas: convert to SPDX identifier
        rtc: max6900: convert to SPDX identifier
        rtc: ds1374: convert to SPDX identifier
        rtc: au1xxx: convert to SPDX identifier
        rtc: pcf85063: Update the PCF85063A datasheet revision
        dt-bindings: rtc: ti,bq32k: take maintainership
        rtc: pcf8563: Fix the datasheet URL
        rtc: pcf85063: Fix the datasheet URL
        rtc: pcf2127: Fix the datasheet URL
        dt-bindings: rtc: ti,bq32k: Convert to json-schema
        dt-bindings: rtc: rx8900: Convert to YAML schema
        ...
      de554096
    • Mel Gorman's avatar
      mm/page_alloc: Revert pahole zero-sized workaround · 6bce2443
      Mel Gorman authored
      Commit dbbee9d5 ("mm/page_alloc: convert per-cpu list protection to
      local_lock") folded in a workaround patch for pahole that was unable to
      deal with zero-sized percpu structures.
      
      A superior workaround is achieved with commit a0b8200d ("kbuild:
      skip per-CPU BTF generation for pahole v1.18-v1.21").
      
      This patch reverts the dummy field and the pahole version check.
      
      Fixes: dbbee9d5
      
       ("mm/page_alloc: convert per-cpu list protection to local_lock")
      Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6bce2443
    • Alexandre Belloni's avatar
      rtc: pcf8523: rename register and bit defines · 4aa90c03
      Alexandre Belloni authored
      arch/arm/mach-ixp4xx/include/mach/platform.h now gets included indirectly
      and defines REG_OFFSET. Rename the register and bit definition to something
      specific to the driver.
      
      Fixes: 7fd70c65
      
       ("ARM: irqstat: Get rid of duplicated declaration")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Link: https://lore.kernel.org/r/20210710211431.1393589-1-alexandre.belloni@bootlin.com
      4aa90c03
    • Linus Torvalds's avatar
      Merge tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · 1e16624d
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "13 cifs/smb3 fixes. Most are to address minor issues pointed out by
        Coverity.
      
        Also includes a packet signing enhancement and mount improvement"
      
      * tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal version number
        cifs: prevent NULL deref in cifs_compose_mount_options()
        SMB3.1.1: Add support for negotiating signing algorithm
        cifs: use helpers when parsing uid/gid mount options and validate them
        CIFS: Clarify SMB1 code for POSIX Lock
        CIFS: Clarify SMB1 code for rename open file
        CIFS: Clarify SMB1 code for delete
        CIFS: Clarify SMB1 code for SetFileSize
        smb3: fix typo in header file
        CIFS: Clarify SMB1 code for UnixSetPathInfo
        CIFS: Clarify SMB1 code for UnixCreateSymLink
        cifs: clarify SMB1 code for UnixCreateHardLink
        cifs: make locking consistent around the server session status
      1e16624d
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 67d8d365
      Linus Torvalds authored
      Pull pci fix from Bjorn Helgaas:
       "Revert host bridge window patch that fixed HP EliteDesk 805 G6, but
        broke ppc:sam460ex (Bjorn Helgaas)"
      
      * tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        Revert "PCI: Coalesce host bridge contiguous apertures"
      67d8d365
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · 88bbd8a0
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
      
       - two small fixes to the svc driver
      
      * tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: master: svc: fix doc warning in svc-i3c-master.c
        i3c: master: svc: drop free_irq of devm_request_irq allocated irq
      88bbd8a0
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · f7ea4be4
      Linus Torvalds authored
      Pull thermal updates from Daniel Lezcano:
      
       - Add rk3568 sensor support (Finley Xiao)
      
       - Add missing MODULE_DEVICE_TABLE for the Spreadtrum sensor (Chunyan
         Zhang)
      
       - Export additionnal attributes for the int340x thermal processor
         (Srinivas Pandruvada)
      
       - Add SC7280 compatible for the tsens driver (Rajeshwari Ravindra
         Kamble)
      
       - Fix kernel documentation for thermal_zone_device_unregister() and use
         devm_platform_get_and_ioremap_resource() (Yang Yingliang)
      
       - Fix coefficient calculations for the rcar_gen3 sensor driver (Niklas
         Söderlund)
      
       - Fix shadowing variable rcar_gen3_ths_tj_1 (Geert Uytterhoeven)
      
       - Add missing of_node_put() for the iMX and Spreadtrum sensors
         (Krzysztof Kozlowski)
      
       - Add tegra3 thermal sensor DT bindings (Dmitry Osipenko)
      
       - Stop the thermal zone monitoring when unregistering it to prevent a
         temperature update without the 'get_temp' callback (Dmitry Osipenko)
      
       - Add rk3568 DT bindings, convert bindings to yaml schemas and add the
         corresponding compatible in the Rockchip sensor (Ezequiel Garcia)
      
       - Add the sc8180x compatible for the Qualcomm tsensor (Bjorn Andersson)
      
       - Use the find_first_zero_bit() function instead of custom code (Andy
         Shevchenko)
      
       - Fix the kernel doc for the device cooling device (Yang Li)
      
       - Reorg the processor thermal int340x to set the scene for the PCI mmio
         driver (Srinivas Pandruvada)
      
       - Add PCI MMIO driver for the int340x processor thermal driver
         (Srinivas Pandruvada)
      
       - Add hwmon sensors for the mediatek sensor (Frank Wunderlich)
      
       - Fix warning for return value reported by Smatch for the int340x
         thermal processor (Srinivas Pandruvada)
      
       - Fix wrong register access and decoding for the int340x thermal
         processor (Srinivas Pandruvada)
      
      * tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (23 commits)
        thermal/drivers/int340x/processor_thermal: Fix tcc setting
        thermal/drivers/int340x/processor_thermal: Fix warning for return value
        thermal/drivers/mediatek: Add sensors-support
        thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver
        thermal/drivers/int340x/processor_thermal: Split enumeration and processing part
        thermal: devfreq_cooling: Fix kernel-doc
        thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit()
        dt-bindings: thermal: tsens: Add sc8180x compatible
        dt-bindings: rockchip-thermal: Support the RK3568 SoC compatible
        dt-bindings: thermal: convert rockchip-thermal to json-schema
        thermal/core/thermal_of: Stop zone device before unregistering it
        dt-bindings: thermal: Add binding for Tegra30 thermal sensor
        thermal/drivers/sprd: Add missing of_node_put for loop iteration
        thermal/drivers/imx_sc: Add missing of_node_put for loop iteration
        thermal/drivers/rcar_gen3_thermal: Do not shadow rcar_gen3_ths_tj_1
        thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations
        thermal/drivers/st: Use devm_platform_get_and_ioremap_resource()
        thermal/core: Correct function name thermal_zone_device_unregister()
        dt-bindings: thermal: tsens: Add compatible string to TSENS binding for SC7280
        thermal/drivers/int340x: processor_thermal: Export additional attributes
        ...
      f7ea4be4