Skip to content
  1. Aug 12, 2022
  2. Aug 11, 2022
    • Ronnie Sahlberg's avatar
      cifs: Move cached-dir functions into a separate file · 05b98fd2
      Ronnie Sahlberg authored
      
      
      Also rename crfid to cfid to have consistent naming for this variable.
      
      This commit does not change any logic.
      
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      05b98fd2
    • David Howells's avatar
      cifs: Remove {cifs,nfs}_fscache_release_page() · cd043455
      David Howells authored
      
      
      Remove {cifs,nfs}_fscache_release_page() from fs/cifs/fscache.h.  This
      functionality got built directly into cifs_release_folio() and will
      hopefully be replaced with netfs_release_folio() at some point.
      
      The "nfs_" version is a copy and paste error and should've been altered to
      read "cifs_".  That can also be removed.
      
      Reported-by: default avatarMatthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      cc: Steve French <smfrench@gmail.com>
      cc: linux-cifs@vger.kernel.org
      cc: samba-technical@lists.samba.org
      cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      cd043455
    • Paulo Alcantara's avatar
      cifs: fix lock length calculation · 773891ff
      Paulo Alcantara authored
      The lock length was wrongly set to 0 when fl_end == OFFSET_MAX, thus
      failing to lock the whole file when l_start=0 and l_len=0.
      
      This fixes test 2 from cthon04.
      
      Before patch:
      
      $ ./cthon04/lock/tlocklfs -t 2 /mnt
      
      Creating parent/child synchronization pipes.
      
      Test #1 - Test regions of an unlocked file.
              Parent: 1.1  - F_TEST  [               0,               1] PASSED.
              Parent: 1.2  - F_TEST  [               0,          ENDING] PASSED.
              Parent: 1.3  - F_TEST  [               0,7fffffffffffffff] PASSED.
              Parent: 1.4  - F_TEST  [               1,               1] PASSED.
              Parent: 1.5  - F_TEST  [               1,          ENDING] PASSED.
              Parent: 1.6  - F_TEST  [               1,7fffffffffffffff] PASSED.
              Parent: 1.7  - F_TEST  [7fffffffffffffff,               1] PASSED.
              Parent: 1.8  - F_TEST  [7fffffffffffffff,          ENDING] PASSED.
              Parent: 1.9  - F_TEST  [7fffffffffffffff,7fffffffffffffff] PASSED.
      
      Test #2 - Try to lock the whole file.
              Parent: 2.0  - F_TLOCK [               0,          ENDING] PASSED.
              Child:  2.1  - F_TEST  [               0,               1] FAILED!
              Child:  **** Expected EACCES, returned success...
              Child:  **** Probably implementation error.
      
      **  CHILD pass 1 results: 0/0 pass, 0/0 warn, 1/1 fail (pass/total).
              Parent: Child died
      
      ** PARENT pass 1 results: 10/10 pass, 0/0 warn, 0/0 fail (pass/total).
      
      After patch:
      
      $ ./cthon04/lock/tlocklfs -t 2 /mnt
      
      Creating parent/child synchronization pipes.
      
      Test #2 - Try to lock the whole file.
              Parent: 2.0  - F_TLOCK [               0,          ENDING] PASSED.
              Child:  2.1  - F_TEST  [               0,               1] PASSED.
              Child:  2.2  - F_TEST  [               0,          ENDING] PASSED.
              Child:  2.3  - F_TEST  [               0,7fffffffffffffff] PASSED.
              Child:  2.4  - F_TEST  [               1,               1] PASSED.
              Child:  2.5  - F_TEST  [               1,          ENDING] PASSED.
              Child:  2.6  - F_TEST  [               1,7fffffffffffffff] PASSED.
              Child:  2.7  - F_TEST  [7fffffffffffffff,               1] PASSED.
              Child:  2.8  - F_TEST  [7fffffffffffffff,          ENDING] PASSED.
              Child:  2.9  - F_TEST  [7fffffffffffffff,7fffffffffffffff] PASSED.
              Parent: 2.10 - F_ULOCK [               0,          ENDING] PASSED.
      
      ** PARENT pass 1 results: 2/2 pass, 0/0 warn, 0/0 fail (pass/total).
      
      **  CHILD pass 1 results: 9/9 pass, 0/0 warn, 0/0 fail (pass/total).
      
      Fixes: d80c6984
      
       ("cifs: fix signed integer overflow when fl_end is OFFSET_MAX")
      Reported-by: default avatarXiaoli Feng <xifeng@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      773891ff
  3. Aug 06, 2022
  4. Aug 01, 2022
  5. Jul 31, 2022
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 6a010258
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Last set of ARM fixes for 5.19:
      
         - fix for MAX_DMA_ADDRESS overflow
      
         - fix for find_*_bit performing an out of bounds memory access"
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: findbit: fix overflowing offset
        ARM: 9216/1: Fix MAX_DMA_ADDRESS overflow
      6a010258
  6. Jul 30, 2022
    • Waiman Long's avatar
      locking/rwsem: Allow slowpath writer to ignore handoff bit if not set by first waiter · 6eebd5fb
      Waiman Long authored
      With commit d257cc8c ("locking/rwsem: Make handoff bit handling more
      consistent"), the writer that sets the handoff bit can be interrupted
      out without clearing the bit if the wait queue isn't empty. This disables
      reader and writer optimistic lock spinning and stealing.
      
      Now if a non-first writer in the queue is somehow woken up or a new
      waiter enters the slowpath, it can't acquire the lock.  This is not the
      case before commit d257cc8c as the writer that set the handoff bit
      will clear it when exiting out via the out_nolock path. This is less
      efficient as the busy rwsem stays in an unlock state for a longer time.
      
      In some cases, this new behavior may cause lockups as shown in [1] and
      [2].
      
      This patch allows a non-first writer to ignore the handoff bit if it
      is not originally set or initiated by the first waiter. This patch is
      shown to be effective in fixing the lockup problem reported in [1].
      
      [1] https://lore.kernel.org/lkml/20220617134325.GC30825@techsingularity.net/
      [2] https://lore.kernel.org/lkml/3f02975c-1a9d-be20-32cf-f1d8e3dfafcc@oracle.com/
      
      Fixes: d257cc8c
      
       ("locking/rwsem: Make handoff bit handling more consistent")
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarJohn Donnelly <john.p.donnelly@oracle.com>
      Tested-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Link: https://lore.kernel.org/r/20220622200419.778799-1-longman@redhat.com
      6eebd5fb
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 62072526
      Linus Torvalds authored
      Pull misc fixes from Andrew Morton:
       "Two hotfixes, both cc:stable"
      
      * tag 'mm-hotfixes-stable-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/hmm: fault non-owner device private entries
        page_alloc: fix invalid watermark check on a negative value
      62072526
    • Linus Torvalds's avatar
      Merge tag 'block-5.19-2022-07-29' of git://git.kernel.dk/linux-block · 8a91f86f
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Just a single fix for NVMe, yet another quirk addition"
      
      * tag 'block-5.19-2022-07-29' of git://git.kernel.dk/linux-block:
        nvme-pci: Crucial P2 has bogus namespace ids
      8a91f86f
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-07-30' of git://anongit.freedesktop.org/drm/drm · e65c6a46
      Linus Torvalds authored
      Pull more drm fixes from Dave Airlie:
       "Maxime had the dog^Wmailing list server eat his homework^Wmisc pull
        request.
      
        Two more small fixes, one in nouveau svm code and the other in
        simpledrm.
      
        nouveau:
         - page migration fix
      
        simpledrm:
         - fix mode_valid return value"
      
      * tag 'drm-fixes-2022-07-30' of git://anongit.freedesktop.org/drm/drm:
        nouveau/svm: Fix to migrate all requested pages
        drm/simpledrm: Fix return type of simpledrm_simple_display_pipe_mode_valid()
      e65c6a46
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-07-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · ce156c8a
      Dave Airlie authored
      
      
      One fix to fix simpledrm mode_valid return value, and one for page
      migration in nouveau
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220729094514.sfzhc3gqjgwgal62@penduick
      ce156c8a
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1c8ac1c4
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four fixes, three in drivers.
      
        The two biggest fixes are ufs and the remaining driver and core fix
        are small and obvious (and the core fix is low risk)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: core: Fix a race condition related to device management
        scsi: core: Fix warning in scsi_alloc_sgtables()
        scsi: ufs: host: Hold reference returned by of_parse_phandle()
        scsi: mpt3sas: Stop fw fault watchdog work item during system shutdown
      1c8ac1c4
    • Eiichi Tsukata's avatar
      docs/kernel-parameters: Update descriptions for "mitigations=" param with retbleed · ea304a8b
      Eiichi Tsukata authored
      
      
      Updates descriptions for "mitigations=off" and "mitigations=auto,nosmt"
      with the respective retbleed= settings.
      
      Signed-off-by: default avatarEiichi Tsukata <eiichi.tsukata@nutanix.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: corbet@lwn.net
      Link: https://lore.kernel.org/r/20220728043907.165688-1-eiichi.tsukata@nutanix.com
      ea304a8b
    • Ralph Campbell's avatar
      mm/hmm: fault non-owner device private entries · 8a295dbb
      Ralph Campbell authored
      If hmm_range_fault() is called with the HMM_PFN_REQ_FAULT flag and a
      device private PTE is found, the hmm_range::dev_private_owner page is used
      to determine if the device private page should not be faulted in. 
      However, if the device private page is not owned by the caller,
      hmm_range_fault() returns an error instead of calling migrate_to_ram() to
      fault in the page.
      
      For example, if a page is migrated to GPU private memory and a RDMA fault
      capable NIC tries to read the migrated page, without this patch it will
      get an error.  With this patch, the page will be migrated back to system
      memory and the NIC will be able to read the data.
      
      Link: https://lkml.kernel.org/r/20220727000837.4128709-2-rcampbell@nvidia.com
      Link: https://lkml.kernel.org/r/20220725183615.4118795-2-rcampbell@nvidia.com
      Fixes: 08ddddda
      
       ("mm/hmm: check the device private page owner in hmm_range_fault()")
      Signed-off-by: default avatarRalph Campbell <rcampbell@nvidia.com>
      Reported-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Cc: Philip Yang <Philip.Yang@amd.com>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      8a295dbb
    • Jaewon Kim's avatar
      page_alloc: fix invalid watermark check on a negative value · 9282012f
      Jaewon Kim authored
      There was a report that a task is waiting at the
      throttle_direct_reclaim. The pgscan_direct_throttle in vmstat was
      increasing.
      
      This is a bug where zone_watermark_fast returns true even when the free
      is very low. The commit f27ce0e1 ("page_alloc: consider highatomic
      reserve in watermark fast") changed the watermark fast to consider
      highatomic reserve. But it did not handle a negative value case which
      can be happened when reserved_highatomic pageblock is bigger than the
      actual free.
      
      If watermark is considered as ok for the negative value, allocating
      contexts for order-0 will consume all free pages without direct reclaim,
      and finally free page may become depleted except highatomic free.
      
      Then allocating contexts may fall into throttle_direct_reclaim. This
      symptom may easily happen in a system where wmark min is low and other
      reclaimers like kswapd does not make free pages quickly.
      
      Handle the negative case by using MIN.
      
      Link: https://lkml.kernel.org/r/20220725095212.25388-1-jaewon31.kim@samsung.com
      Fixes: f27ce0e1
      
       ("page_alloc: consider highatomic reserve in watermark fast")
      Signed-off-by: default avatarJaewon Kim <jaewon31.kim@samsung.com>
      Reported-by: default avatarGyeongHwan Hong <gh21.hong@samsung.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Yong-Taek Lee <ytk.lee@samsung.com>
      Cc: <stable@vger.kerenl.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      9282012f
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-29' of... · bb83c99d
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.19-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix addresses for bss symbols, describing variables used in resolving
         data access in tools such as 'perf c2c' and 'perf mem'.
      
       - Skip symbols if SHF_ALLOC flag is not set, a technique used for
         listing deprecated symbols, its addresses are zeros, so not useful.
      
       - Remove undefined behavior from bpf_perf_object__next() when dealing
         with an empty bpf_objects_list list.
      
       - Make a ARM CoreSight disasm script work with both python2 and
         python3.
      
       - Sync x86's cpufeatures header with with the kernel sources.
      
      * tag 'perf-tools-fixes-for-v5.19-2022-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf bpf: Remove undefined behavior from bpf_perf_object__next()
        perf symbol: Skip symbols if SHF_ALLOC flag is not set
        perf symbol: Correct address for bss symbols
        perf scripts python: Let script to be python2 compliant
        tools headers cpufeatures: Sync with the kernel sources
      bb83c99d