1. 06 May, 2023 17 commits
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-05-06-10-45' of... · 706ce3ca
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull hotfixes from Andrew Morton:
       "Five hotfixes.
      
        Three are cc:stable, two pertain to merge window changes"
      
      * tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        afs: fix the afs_dir_get_folio return value
        nilfs2: do not write dirty data after degenerating to read-only
        mm: do not reclaim private data from pinned page
        nilfs2: fix infinite loop in nilfs_mdt_get_block()
        mm/mmap/vma_merge: always check invariants
      706ce3ca
    • Linus Torvalds's avatar
      nfs: fix mis-merged __filemap_get_folio() error check · 994e2419
      Linus Torvalds authored
      Fix another case of an incorrect check for the returned 'folio' value
      from __filemap_get_folio().
      
      The failure case used to return NULL, but was changed by commit
      66dabbb6 ("mm: return an ERR_PTR from __filemap_get_folio").
      
      But in the meantime, commit ec108d3c ("NFS: Convert readdir page
      array functions to use a folio") added a new user of that function.
      
      And my merge of the two did not fix this up correctly.
      
      The ext4 merge had the same issue, but that one had been caught in
      linux-next and got properly fixed while merging.
      
      Fixes: 0127f25b ("Merge tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs")
      Cc: Anna Schumaker <anna@kernel.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      994e2419
    • Christoph Hellwig's avatar
      afs: fix the afs_dir_get_folio return value · 58f5f669
      Christoph Hellwig authored
      Keep returning NULL on failure instead of letting an ERR_PTR escape to
      callers that don't expect it.
      
      Link: https://lkml.kernel.org/r/20230503154526.1223095-2-hch@lst.de
      Fixes: 66dabbb6 ("mm: return an ERR_PTR from __filemap_get_folio")
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reported-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Marc Dionne <marc.dionne@auristor.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      58f5f669
    • Ryusuke Konishi's avatar
      nilfs2: do not write dirty data after degenerating to read-only · 28a65b49
      Ryusuke Konishi authored
      According to syzbot's report, mark_buffer_dirty() called from
      nilfs_segctor_do_construct() outputs a warning with some patterns after
      nilfs2 detects metadata corruption and degrades to read-only mode.
      
      After such read-only degeneration, page cache data may be cleared through
      nilfs_clear_dirty_page() which may also clear the uptodate flag for their
      buffer heads.  However, even after the degeneration, log writes are still
      performed by unmount processing etc., which causes mark_buffer_dirty() to
      be called for buffer heads without the "uptodate" flag and causes the
      warning.
      
      Since any writes should not be done to a read-only file system in the
      first place, this fixes the warning in mark_buffer_dirty() by letting
      nilfs_segctor_do_construct() abort early if in read-only mode.
      
      This also changes the retry check of nilfs_segctor_write_out() to avoid
      unnecessary log write retries if it detects -EROFS that
      nilfs_segctor_do_construct() returned.
      
      Link: https://lkml.kernel.org/r/20230427011526.13457-1-konishi.ryusuke@gmail.comSigned-off-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
      Tested-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
      Reported-by: syzbot+2af3bc9585be7f23f290@syzkaller.appspotmail.com
        Link: https://syzkaller.appspot.com/bug?extid=2af3bc9585be7f23f290
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      28a65b49
    • Jan Kara's avatar
      mm: do not reclaim private data from pinned page · d824ec2a
      Jan Kara authored
      If the page is pinned, there's no point in trying to reclaim it. 
      Furthermore if the page is from the page cache we don't want to reclaim
      fs-private data from the page because the pinning process may be writing
      to the page at any time and reclaiming fs private info on a dirty page can
      upset the filesystem (see link below).
      
      Link: https://lore.kernel.org/linux-mm/20180103100430.GE4911@quack2.suse.cz
      Link: https://lkml.kernel.org/r/20230428124140.30166-1-jack@suse.czSigned-off-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Reviewed-by: default avatarLorenzo Stoakes <lstoakes@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
      Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
      Acked-by: default avatarPeter Xu <peterx@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      d824ec2a
    • Ryusuke Konishi's avatar
      nilfs2: fix infinite loop in nilfs_mdt_get_block() · a6a491c0
      Ryusuke Konishi authored
      If the disk image that nilfs2 mounts is corrupted and a virtual block
      address obtained by block lookup for a metadata file is invalid,
      nilfs_bmap_lookup_at_level() may return the same internal return code as
      -ENOENT, meaning the block does not exist in the metadata file.
      
      This duplication of return codes confuses nilfs_mdt_get_block(), causing
      it to read and create a metadata block indefinitely.
      
      In particular, if this happens to the inode metadata file, ifile,
      semaphore i_rwsem can be left held, causing task hangs in lock_mount.
      
      Fix this issue by making nilfs_bmap_lookup_at_level() treat virtual block
      address translation failures with -ENOENT as metadata corruption instead
      of returning the error code.
      
      Link: https://lkml.kernel.org/r/20230430193046.6769-1-konishi.ryusuke@gmail.comSigned-off-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
      Tested-by: default avatarRyusuke Konishi <konishi.ryusuke@gmail.com>
      Reported-by: syzbot+221d75710bde87fa0e97@syzkaller.appspotmail.com
        Link: https://syzkaller.appspot.com/bug?extid=221d75710bde87fa0e97
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a6a491c0
    • Lorenzo Stoakes's avatar
      mm/mmap/vma_merge: always check invariants · 29417d29
      Lorenzo Stoakes authored
      We may still have inconsistent input parameters even if we choose not to
      merge and the vma_merge() invariant checks are useful for checking this
      with no production runtime cost (these are only relevant when
      CONFIG_DEBUG_VM is specified).
      
      Therefore, perform these checks regardless of whether we merge.
      
      This is relevant, as a recent issue (addressed in commit "mm/mempolicy:
      Correctly update prev when policy is equal on mbind") in the mbind logic
      was only picked up in the 6.2.y stable branch where these assertions are
      performed prior to determining mergeability.
      
      Had this remained the same in mainline this issue may have been picked up
      faster, so moving forward let's always check them.
      
      Link: https://lkml.kernel.org/r/df548a6ae3fa135eec3b446eb3dae8eb4227da97.1682885809.git.lstoakes@gmail.comSigned-off-by: default avatarLorenzo Stoakes <lstoakes@gmail.com>
      Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      29417d29
    • Matthew Wilcox's avatar
      filemap: Handle error return from __filemap_get_folio() · 38a55db9
      Matthew Wilcox authored
      Smatch reports that filemap_fault() was missed in the conversion of
      __filemap_get_folio() error returns from NULL to ERR_PTR.
      
      Fixes: 66dabbb6 ("mm: return an ERR_PTR from __filemap_get_folio")
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Reported-by: syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      38a55db9
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · dd9e11d6
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "Six late arriving patches for the merge window. Five are minor
        assorted fixes and updates.
      
        The IPR driver change removes SATA support, which will now allow a
        major cleanup in the ATA subsystem because it was the only driver
        still using the old attachment mechanism. The driver is only used on
        power systems and SATA was used to support a DVD device, which has
        long been moved to a different hba. IBM chose this route instead of
        porting ipr to the newer SATA interfaces"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qedi: Fix use after free bug in qedi_remove()
        scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue
        scsi: ipr: Remove several unused variables
        scsi: pm80xx: Log device registration
        scsi: ipr: Remove SATA support
        scsi: scsi_debug: Abort commands from scsi_debug_device_reset()
      dd9e11d6
    • Linus Torvalds's avatar
      Merge tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux · a3b111b0
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
      
       - MD pull request via Song:
            - Improve raid5 sequential IO performance on spinning disks, which
              fixes a regression since v6.0 (Jan Kara)
            - Fix bitmap offset types, which fixes an issue introduced in this
              merge window (Jonathan Derrick)
      
       - Cleanup of hweight type used for cgroup writeback (Maxim)
      
       - Fix a regression with the "has_submit_bio" changes across partitions
         (Ming)
      
       - Cleanup of QUEUE_FLAG_ADD_RANDOM clearing.
      
         We used to set this flag on queues non blk-mq queues, and hence some
         drivers clear it unconditionally. Since all of these have since been
         converted to true blk-mq drivers, drop the useless clear as the bit
         is not set (Chaitanya)
      
       - Fix the flags being set in a bio for a flush for drbd (Christoph)
      
       - Cleanup and deduplication of the code handling setting block device
         capacity (Damien)
      
       - Fix for ublk handling IO timeouts (Ming)
      
       - Fix for a regression in blk-cgroup teardown (Tao)
      
       - NBD documentation and code fixes (Eric)
      
       - Convert blk-integrity to using device_attributes rather than a second
         kobject to manage lifetimes (Thomas)
      
      * tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux:
        ublk: add timeout handler
        drbd: correctly submit flush bio on barrier
        mailmap: add mailmap entries for Jens Axboe
        block: Skip destroyed blkg when restart in blkg_destroy_all()
        writeback: fix call of incorrect macro
        md: Fix bitmap offset type in sb writer
        md/raid5: Improve performance for sequential IO
        docs nbd: userspace NBD now favors github over sourceforge
        block nbd: use req.cookie instead of req.handle
        uapi nbd: add cookie alias to handle
        uapi nbd: improve doc links to userspace spec
        blk-integrity: register sysfs attributes on struct device
        blk-integrity: convert to struct device_attribute
        blk-integrity: use sysfs_emit
        block/drivers: remove dead clear of random flag
        block: sync part's ->bd_has_submit_bio with disk's
        block: Cleanup set_capacity()/bdev_set_nr_sectors()
      a3b111b0
    • Linus Torvalds's avatar
      Merge tag 'pipe-nonblock-2023-05-06' of git://git.kernel.dk/linux · 7644c823
      Linus Torvalds authored
      Pull nonblocking pipe io_uring support from Jens Axboe:
       "Here's the revised edition of the FMODE_NOWAIT support for pipes, in
        which we just flag it as such supporting FMODE_NOWAIT unconditionally,
        but clear it if we ever end up using splice/vmsplice on the pipe.
      
        The pipe read/write side is perfectly fine for nonblocking IO, however
        splice and vmsplice can potentially wait for IO with the pipe lock
        held"
      
      * tag 'pipe-nonblock-2023-05-06' of git://git.kernel.dk/linux:
        pipe: set FMODE_NOWAIT on pipes
        splice: clear FMODE_NOWAIT on file if splice/vmsplice is used
      7644c823
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 0021b532
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes for rc1.
      
        The only (LOC-wise) dominant change was ASoC Qualcomm fix, but most of
        it was merely a code shuffling.
      
        Another significant change here is for ALSA PCM core; it received a
        revert and a series of fixes for PCM auto-silencing where it caused a
        regression in the previous PR for rc1.
      
        Others are all small: ASoC Intel fixes, various quirks for ASoC AMD,
        HD-audio and USB-audio, the continued legacy emu10k1 code cleanup, and
        some documentation updates"
      
      * tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits)
        ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence()
        ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence()
        ALSA: pcm: playback silence - move silence variable updates to separate function
        ALSA: pcm: playback silence - remove extra code
        ALSA: pcm: fix playback silence - correct incremental silencing
        ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode
        ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()"
        ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop
        ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
        ALSA: usb-audio: Add quirk for Pioneer DDJ-800
        ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED
        ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
        ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x
        ASoC: codecs: wcd938x: fix accessing regmap on unattached devices
        ALSA: docs: Fix code block indentation in ALSA driver example
        ALSA: docs: Extend module parameters description
        ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41
        ALSA: emu10k1: use more existing defines instead of open-coded numbers
        ASoC: amd: yc: Add ASUS M3402RA into DMI table
        ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6
        ...
      0021b532
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 27e0c846
      Linus Torvalds authored
      Pull regulator fix from Mark Brown:
       "A trivial typo fix that came in during the merge window"
      
      * tag 'regulator-fix-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: consumer.rst: fix 'regulator_enable' typo.
      27e0c846
    • Linus Torvalds's avatar
      Merge tag '6.4-rc-ksmbd-server-fixes-part2' of git://git.samba.org/ksmbd · 2e1e1337
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
       "Ten ksmbd server fixes, including some important security fixes:
      
         - Two use after free fixes
      
         - Fix RCU callback race
      
         - Deadlock fix
      
         - Three patches to prevent session setup attacks
      
         - Prevent guest users from establishing multichannel sessions
      
         - Fix null pointer dereference in query FS info
      
         - Memleak fix"
      
      * tag '6.4-rc-ksmbd-server-fixes-part2' of git://git.samba.org/ksmbd:
        ksmbd: call rcu_barrier() in ksmbd_server_exit()
        ksmbd: fix racy issue under cocurrent smb2 tree disconnect
        ksmbd: fix racy issue from smb2 close and logoff with multichannel
        ksmbd: not allow guest user on multichannel
        ksmbd: fix deadlock in ksmbd_find_crypto_ctx()
        ksmbd: block asynchronous requests when making a delay on session setup
        ksmbd: destroy expired sessions
        ksmbd: fix racy issue from session setup and logoff
        ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
        ksmbd: fix memleak in session setup
      2e1e1337
    • Linus Torvalds's avatar
      Merge tag 'net-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · ed23734c
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter.
      
        Current release - regressions:
      
         - sched: act_pedit: free pedit keys on bail from offset check
      
        Current release - new code bugs:
      
         - pds_core:
            - Kconfig fixes (DEBUGFS and AUXILIARY_BUS)
            - fix mutex double unlock in error path
      
        Previous releases - regressions:
      
         - sched: cls_api: remove block_cb from driver_list before freeing
      
         - nf_tables: fix ct untracked match breakage
      
         - eth: mtk_eth_soc: drop generic vlan rx offload
      
         - sched: flower: fix error handler on replace
      
        Previous releases - always broken:
      
         - tcp: fix skb_copy_ubufs() vs BIG TCP
      
         - ipv6: fix skb hash for some RST packets
      
         - af_packet: don't send zero-byte data in packet_sendmsg_spkt()
      
         - rxrpc: timeout handling fixes after moving client call connection
           to the I/O thread
      
         - ixgbe: fix panic during XDP_TX with > 64 CPUs
      
         - igc: RMW the SRRCTL register to prevent losing timestamp config
      
         - dsa: mt7530: fix corrupt frames using TRGMII on 40 MHz XTAL MT7621
      
         - r8152:
            - fix flow control issue of RTL8156A
            - fix the poor throughput for 2.5G devices
            - move setting r8153b_rx_agg_chg_indicate() to fix coalescing
            - enable autosuspend
      
         - ncsi: clear Tx enable mode when handling a Config required AEN
      
         - octeontx2-pf: macsec: fixes for CN10KB ASIC rev
      
        Misc:
      
         - 9p: remove INET dependency"
      
      * tag 'net-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits)
        net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
        pds_core: fix mutex double unlock in error path
        net/sched: flower: fix error handler on replace
        Revert "net/sched: flower: Fix wrong handle assignment during filter change"
        net/sched: flower: fix filter idr initialization
        net: fec: correct the counting of XDP sent frames
        bonding: add xdp_features support
        net: enetc: check the index of the SFI rather than the handle
        sfc: Add back mailing list
        virtio_net: suppress cpu stall when free_unused_bufs
        ice: block LAN in case of VF to VF offload
        net: dsa: mt7530: fix network connectivity with multiple CPU ports
        net: dsa: mt7530: fix corrupt frames using trgmii on 40 MHz XTAL MT7621
        9p: Remove INET dependency
        netfilter: nf_tables: fix ct untracked match breakage
        af_packet: Don't send zero-byte data in packet_sendmsg_spkt().
        igc: read before write to SRRCTL register
        pds_core: add AUXILIARY_BUS and NET_DEVLINK to Kconfig
        pds_core: remove CONFIG_DEBUG_FS from makefile
        ionic: catch failure from devlink_alloc
        ...
      ed23734c
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · a5e21900
      Linus Torvalds authored
      Pull more i2c updates from Wolfram Sang:
       "Some more driver bugfixes and a DT binding conversion"
      
      * tag 'i2c-for-6.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        dt-bindings: i2c: brcm,kona-i2c: convert to YAML
        i2c: gxp: fix build failure without CONFIG_I2C_SLAVE
        i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks
        i2c: omap: Fix standard mode false ACK readings
        i2c: tegra: Fix PEC support for SMBUS block read
      a5e21900
    • Lukas Bulwahn's avatar
      s390: remove the unneeded select GCC12_NO_ARRAY_BOUNDS · c12753d5
      Lukas Bulwahn authored
      Commit 0da6e5fd ("gcc: disable '-Warray-bounds' for gcc-13 too") makes
      config GCC11_NO_ARRAY_BOUNDS to be for disabling -Warray-bounds in any gcc
      version 11 and upwards, and with that, removes the GCC12_NO_ARRAY_BOUNDS
      config as it is now covered by the semantics of GCC11_NO_ARRAY_BOUNDS.
      
      As GCC11_NO_ARRAY_BOUNDS is yes by default, there is no need for the s390
      architecture to explicitly select GCC11_NO_ARRAY_BOUNDS. Hence, the select
      GCC12_NO_ARRAY_BOUNDS in arch/s390/Kconfig can simply be dropped.
      
      Remove the unneeded "select GCC12_NO_ARRAY_BOUNDS".
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c12753d5
  2. 05 May, 2023 23 commits