Skip to content
Permalink
Matthew-Wilcox…
Switch branches/tags

Commits on Apr 16, 2021

  1. mm: Indicate pfmemalloc pages in compound_head

    The net page_pool wants to use a magic value to identify page pool pages.
    The best place to put it is in the first word where it can be clearly a
    non-pointer value.  That means shifting dma_addr up to alias with ->index,
    which means we need to find another way to indicate page_is_pfmemalloc().
    Since page_pool doesn't want to set its magic value on pages which are
    pfmemalloc, we can use bit 1 of compound_head to indicate that the page
    came from the memory reserves.
    
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Matthew Wilcox (Oracle) authored and intel-lab-lkp committed Apr 16, 2021
  2. mm: Fix struct page layout on 32-bit systems

    32-bit architectures which expect 8-byte alignment for 8-byte integers
    and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct
    page inadvertently expanded in 2019.  When the dma_addr_t was added,
    it forced the alignment of the union to 8 bytes, which inserted a 4 byte
    gap between 'flags' and the union.
    
    Fix this by storing the dma_addr_t in one or two adjacent unsigned longs.
    This restores the alignment to that of an unsigned long, and also fixes a
    potential problem where (on a big endian platform), the bit used to denote
    PageTail could inadvertently get set, and a racing get_user_pages_fast()
    could dereference a bogus compound_head().
    
    Fixes: c25fff7 ("mm: add dma_addr_t to struct page")
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Matthew Wilcox (Oracle) authored and intel-lab-lkp committed Apr 16, 2021

Commits on Mar 30, 2021

  1. reiserfs: update reiserfs_xattrs_initialized() condition

    syzbot is reporting NULL pointer dereference at reiserfs_security_init()
    [1], for commit ab17c4f ("reiserfs: fixup xattr_root caching")
    is assuming that REISERFS_SB(s)->xattr_root != NULL in
    reiserfs_xattr_jcreate_nblocks() despite that commit made
    REISERFS_SB(sb)->priv_root != NULL && REISERFS_SB(s)->xattr_root == NULL
    case possible.
    
    I guess that commit 6cb4aff ("reiserfs: fix oops while creating
    privroot with selinux enabled") wanted to check xattr_root != NULL
    before reiserfs_xattr_jcreate_nblocks(), for the changelog is talking
    about the xattr root.
    
      The issue is that while creating the privroot during mount
      reiserfs_security_init calls reiserfs_xattr_jcreate_nblocks which
      dereferences the xattr root. The xattr root doesn't exist, so we get
      an oops.
    
    Therefore, update reiserfs_xattrs_initialized() to check both the
    privroot and the xattr root.
    
    Link: https://syzkaller.appspot.com/bug?id=8abaedbdeb32c861dc5340544284167dd0e46cde # [1]
    Reported-and-tested-by: syzbot <syzbot+690cb1e51970435f9775@syzkaller.appspotmail.com>
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Fixes: 6cb4aff ("reiserfs: fix oops while creating privroot with selinux enabled")
    Acked-by: Jeff Mahoney <jeffm@suse.com>
    Acked-by: Jan Kara <jack@suse.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Tetsuo Handa authored and torvalds committed Mar 30, 2021
  2. Merge tag 's390-5.12-5' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/s390/linux
    
    Pull s390 updates from Heiko Carstens:
    
     - fix incorrect initialization and update of vdso data pages, which
       results in incorrect tod clock steering, and that
       clock_gettime(CLOCK_MONOTONIC_RAW, ...) returns incorrect values.
    
     - update MAINTAINERS for s390 vfio drivers
    
    * tag 's390-5.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
      MAINTAINERS: add backups for s390 vfio drivers
      s390/vdso: fix initializing and updating of vdso_data
      s390/vdso: fix tod_steering_delta type
      s390/vdso: copy tod_steering_delta value to vdso_data page
    torvalds committed Mar 30, 2021
  3. Merge tag 'vfio-v5.12-rc6' of git://github.com/awilliam/linux-vfio

    Pull VFIO fixes from Alex Williamson:
    
     - Fix pfnmap batch carryover (Daniel Jordan)
    
     - Fix nvlink Kconfig dependency (Jason Gunthorpe)
    
    * tag 'vfio-v5.12-rc6' of git://github.com/awilliam/linux-vfio:
      vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends
      vfio/type1: Empty batch for pfnmap pages
    torvalds committed Mar 30, 2021
  4. mm: fix race by making init_zero_pfn() early_initcall

    There are code paths that rely on zero_pfn to be fully initialized
    before core_initcall.  For example, wq_sysfs_init() is a core_initcall
    function that eventually results in a call to kernel_execve, which
    causes a page fault with a subsequent mmput.  If zero_pfn is not
    initialized by then it may not get cleaned up properly and result in an
    error:
    
      BUG: Bad rss-counter state mm:(ptrval) type:MM_ANONPAGES val:1
    
    Here is an analysis of the race as seen on a MIPS device. On this
    particular MT7621 device (Ubiquiti ER-X), zero_pfn is PFN 0 until
    initialized, at which point it becomes PFN 5120:
    
      1. wq_sysfs_init calls into kobject_uevent_env at core_initcall:
           kobject_uevent_env+0x7e4/0x7ec
           kset_register+0x68/0x88
           bus_register+0xdc/0x34c
           subsys_virtual_register+0x34/0x78
           wq_sysfs_init+0x1c/0x4c
           do_one_initcall+0x50/0x1a8
           kernel_init_freeable+0x230/0x2c8
           kernel_init+0x10/0x100
           ret_from_kernel_thread+0x14/0x1c
    
      2. kobject_uevent_env() calls call_usermodehelper_exec() which executes
         kernel_execve asynchronously.
    
      3. Memory allocations in kernel_execve cause a page fault, bumping the
         MM reference counter:
           add_mm_counter_fast+0xb4/0xc0
           handle_mm_fault+0x6e4/0xea0
           __get_user_pages.part.78+0x190/0x37c
           __get_user_pages_remote+0x128/0x360
           get_arg_page+0x34/0xa0
           copy_string_kernel+0x194/0x2a4
           kernel_execve+0x11c/0x298
           call_usermodehelper_exec_async+0x114/0x194
    
      4. In case zero_pfn has not been initialized yet, zap_pte_range does
         not decrement the MM_ANONPAGES RSS counter and the BUG message is
         triggered shortly afterwards when __mmdrop checks the ref counters:
           __mmdrop+0x98/0x1d0
           free_bprm+0x44/0x118
           kernel_execve+0x160/0x1d8
           call_usermodehelper_exec_async+0x114/0x194
           ret_from_kernel_thread+0x14/0x1c
    
    To avoid races such as described above, initialize init_zero_pfn at
    early_initcall level.  Depending on the architecture, ZERO_PAGE is
    either constant or gets initialized even earlier, at paging_init, so
    there is no issue with initializing zero_pfn earlier.
    
    Link: https://lkml.kernel.org/r/CALCv0x2YqOXEAy2Q=hafjhHCtTHVodChv1qpM=niAXOpqEbt7w@mail.gmail.com
    Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: stable@vger.kernel.org
    Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    lipnitsk authored and torvalds committed Mar 30, 2021
  5. Merge tag 'mips-fixes_5.12_3' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/mips/linux
    
    Pull MIPS fix from Thomas Bogendoerfer:
    
     - Fix compile error with option MIPS_ELF_APPENDED_DTB
    
    * tag 'mips-fixes_5.12_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
      MIPS: kernel: setup.c: fix compilation error
    torvalds committed Mar 30, 2021
  6. Merge tag 'for-linus-5.12b-rc6-tag' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/xen/tip
    
    Pull xen fix from Juergen Gross:
     "One Xen related security fix (XSA-371)"
    
    * tag 'for-linus-5.12b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
      xen-blkback: don't leak persistent grants from xen_blkbk_map()
    torvalds committed Mar 30, 2021
  7. MIPS: kernel: setup.c: fix compilation error

    With ath79_defconfig enabling CONFIG_MIPS_ELF_APPENDED_DTB gives a
    compilation error. This patch fixes it.
    
    Build log:
    ...
      CC      kernel/locking/percpu-rwsem.o
    ../arch/mips/kernel/setup.c:46:39: error: conflicting types for
    '__appended_dtb'
     const char __section(".appended_dtb") __appended_dtb[0x100000];
                                           ^~~~~~~~~~~~~~
    In file included from ../arch/mips/kernel/setup.c:34:
    ../arch/mips/include/asm/bootinfo.h:118:13: note: previous declaration
    of '__appended_dtb' was here
     extern char __appended_dtb[];
                 ^~~~~~~~~~~~~~
      CC      fs/attr.o
    make[4]: *** [../scripts/Makefile.build:271: arch/mips/kernel/setup.o]
     Error 1
    ...
    
    Root cause seems to be:
    Fixes: b83ba0b ("MIPS: of: Introduce helper function to get DTB")
    
    Signed-off-by: Mauri Sandberg <sandberg@mailfence.com>
    Reviewed-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: trivial@kernel.org
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    msandber authored and tsbogend committed Mar 30, 2021

Commits on Mar 29, 2021

  1. vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends

    Compiling the nvlink stuff relies on the SPAPR_TCE_IOMMU otherwise there
    are compile errors:
    
     drivers/vfio/pci/vfio_pci_nvlink2.c:101:10: error: implicit declaration of function 'mm_iommu_put' [-Werror,-Wimplicit-function-declaration]
                                ret = mm_iommu_put(data->mm, data->mem);
    
    As PPC only defines these functions when the config is set.
    
    Previously this wasn't a problem by chance as SPAPR_TCE_IOMMU was the only
    IOMMU that could have satisfied IOMMU_API on POWERNV.
    
    Fixes: 179209f ("vfio: IOMMU_API should be selected")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Message-Id: <0-v1-83dba9768fc3+419-vfio_nvlink2_kconfig_jgg@nvidia.com>
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    jgunthorpe authored and awilliam committed Mar 29, 2021
  2. Merge tag 'xtensa-20210329' of git://github.com/jcmvbkbc/linux-xtensa

    Pull xtensa fixes from Max Filippov:
    
     - fix build with separate exception vectors when they are placed too
       far from the rest of the kernel
    
     - fix uaccess-related livelock in do_page_fault.
    
    * tag 'xtensa-20210329' of git://github.com/jcmvbkbc/linux-xtensa:
      xtensa: fix uaccess-related livelock in do_page_fault
      xtensa: move coprocessor_flush to the .text section
    torvalds committed Mar 29, 2021
  3. xtensa: fix uaccess-related livelock in do_page_fault

    If a uaccess (e.g. get_user()) triggers a fault and there's a
    fault signal pending, the handler will return to the uaccess without
    having performed a uaccess fault fixup, and so the CPU will immediately
    execute the uaccess instruction again, whereupon it will livelock
    bouncing between that instruction and the fault handler.
    
    https://lore.kernel.org/lkml/20210121123140.GD48431@C02TD0UTHF1T.local/
    
    Cc: stable@vger.kernel.org
    Reported-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    jcmvbkbc committed Mar 29, 2021

Commits on Mar 28, 2021

  1. Linux 5.12-rc5

    torvalds committed Mar 28, 2021
  2. Merge tag 'perf-tools-fixes-for-v5.12-2020-03-28' of git://git.kernel…

    ….org/pub/scm/linux/kernel/git/acme/linux
    
    Pull perf tooling fixes from Arnaldo Carvalho de Melo:
    
     - Avoid write of uninitialized memory when generating PERF_RECORD_MMAP*
       records.
    
     - Fix 'perf top' BPF support related crash with perf_event_paranoid=3 +
       kptr_restrict.
    
     - Validate raw event with sysfs exported format bits.
    
     - Fix waipid on SIGCHLD delivery bugs in 'perf daemon'.
    
     - Change to use bash for daemon test on Debian, where the default is
       dash and thus fails for use of bashisms in this test.
    
     - Fix memory leak in vDSO found using ASAN.
    
     - Remove now useless (due to the fact that BPF now supports static
       vars) failing sub test "BPF relocation checker".
    
     - Fix auxtrace queue conflict.
    
     - Sync linux/kvm.h with the kernel sources.
    
    * tag 'perf-tools-fixes-for-v5.12-2020-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
      perf test: Change to use bash for daemon test
      perf record: Fix memory leak in vDSO found using ASAN
      perf test: Remove now useless failing sub test "BPF relocation checker"
      perf daemon: Return from kill functions
      perf daemon: Force waipid for all session on SIGCHLD delivery
      perf top: Fix BPF support related crash with perf_event_paranoid=3 + kptr_restrict
      perf pmu: Validate raw event with sysfs exported format bits
      perf synthetic events: Avoid write of uninitialized memory when generating PERF_RECORD_MMAP* records
      tools headers UAPI: Sync linux/kvm.h with the kernel sources
      perf synthetic-events: Fix uninitialized 'kernel_thread' variable
      perf auxtrace: Fix auxtrace queue conflict
    torvalds committed Mar 28, 2021
  3. Merge tag 'auxdisplay-for-linus-v5.12-rc6' of git://github.com/ojeda/…

    …linux
    
    Pull auxdisplay fix from Miguel Ojeda:
     "Remove in_interrupt() usage (Sebastian Andrzej Siewior)"
    
    * tag 'auxdisplay-for-linus-v5.12-rc6' of git://github.com/ojeda/linux:
      auxdisplay: Remove in_interrupt() usage.
    torvalds committed Mar 28, 2021
  4. Merge tag 'x86-urgent-2021-03-28' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/tip/tip
    
    Pull x86 fixes from Ingo Molnar:
     "Two fixes:
    
       - Fix build failure on Ubuntu with new GCC packages that turn
         on -fcf-protection
    
       - Fix SME memory encryption PTE encoding bug - AFAICT the code
         worked on 4K page sizes (level 1) but had the wrong shift at
         higher page level orders (level 2 and higher)"
    
    * tag 'x86-urgent-2021-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86/build: Turn off -fcf-protection for realmode targets
      x86/mem_encrypt: Correct physical address calculation in __set_clr_pte_enc()
    torvalds committed Mar 28, 2021
  5. Merge tag 'locking-urgent-2021-03-28' of git://git.kernel.org/pub/scm…

    …/linux/kernel/git/tip/tip
    
    Pull locking fix from Ingo Molnar:
     "Fix the non-debug mutex_lock_io_nested() method to map to
      mutex_lock_io() instead of mutex_lock().
    
      Right now nothing uses this API explicitly, but this is an
      accident waiting to happen"
    
    * tag 'locking-urgent-2021-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      locking/mutex: Fix non debug version of mutex_lock_io_nested()
    torvalds committed Mar 28, 2021
  6. Merge tag '5.12-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6

    Pull cifs fixes from Steve French:
     "Five cifs/smb3 fixes, two for stable.
    
      Includes an important fix for encryption and an ACL fix, as well as a
      fix for possible reflink data corruption"
    
    * tag '5.12-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6:
      smb3: fix cached file size problems in duplicate extents (reflink)
      cifs: Silently ignore unknown oplock break handle
      cifs: revalidate mapping when we open files for SMB1 POSIX
      cifs: Fix chmod with modefromsid when an older ACE already exists.
      cifs: Adjust key sizes and key generation routines for AES256 encryption
    torvalds committed Mar 28, 2021
  7. Merge tag 'io_uring-5.12-2021-03-27' of git://git.kernel.dk/linux-block

    Pull io_uring fixes from Jens Axboe:
    
     - Use thread info versions of flag testing, as discussed last week.
    
     - The series enabling PF_IO_WORKER to just take signals, instead of
       needing to special case that they do not in a bunch of places. Ends
       up being pretty trivial to do, and then we can revert all the special
       casing we're currently doing.
    
     - Kill dead pointer assignment
    
     - Fix hashed part of async work queue trace
    
     - Fix sign extension issue for IORING_OP_PROVIDE_BUFFERS
    
     - Fix a link completion ordering regression in this merge window
    
     - Cancellation fixes
    
    * tag 'io_uring-5.12-2021-03-27' of git://git.kernel.dk/linux-block:
      io_uring: remove unsued assignment to pointer io
      io_uring: don't cancel extra on files match
      io_uring: don't cancel-track common timeouts
      io_uring: do post-completion chore on t-out cancel
      io_uring: fix timeout cancel return code
      Revert "signal: don't allow STOP on PF_IO_WORKER threads"
      Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing"
      Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"
      Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"
      kernel: stop masking signals in create_io_thread()
      io_uring: handle signals for IO threads like a normal thread
      kernel: don't call do_exit() for PF_IO_WORKER threads
      io_uring: maintain CQE order of a failed link
      io-wq: fix race around pending work on teardown
      io_uring: do ctx sqd ejection in a clear context
      io_uring: fix provide_buffers sign extension
      io_uring: don't skip file_end_write() on reissue
      io_uring: correct io_queue_async_work() traces
      io_uring: don't use {test,clear}_tsk_thread_flag() for current
    torvalds committed Mar 28, 2021
  8. Merge tag 'block-5.12-2021-03-27' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
    
     - Fix regression from this merge window with the xarray partition
       change, which allowed partition counts that overflow the u8 that
       holds the partition number (Ming)
    
     - Fix zone append warning (Johannes)
    
     - Segmentation count fix for multipage bvecs (David)
    
     - Partition scan fix (Chris)
    
    * tag 'block-5.12-2021-03-27' of git://git.kernel.dk/linux-block:
      block: don't create too many partitions
      block: support zone append bvecs
      block: recalculate segment count for multi-segment discards correctly
      block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
    torvalds committed Mar 28, 2021
  9. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Seven fixes, all in drivers (qla2xxx, mkt3sas, qedi, target,
      ibmvscsi).
    
      The most serious are the target pscsi oom and the qla2xxx revert which
      can otherwise cause a use after free"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
      scsi: target: pscsi: Avoid OOM in pscsi_map_sg()
      scsi: mpt3sas: Fix error return code of mpt3sas_base_attach()
      scsi: qedi: Fix error return code of qedi_alloc_global_queues()
      scsi: Revert "qla2xxx: Make sure that aborted commands are freed"
      scsi: ibmvfc: Make ibmvfc_wait_for_ops() MQ aware
      scsi: ibmvfc: Fix potential race in ibmvfc_wait_for_ops()
    torvalds committed Mar 28, 2021
  10. MAINTAINERS: add backups for s390 vfio drivers

    Add a backup for s390 vfio-pci, an additional backup for vfio-ccw
    and replace the backup for vfio-ap as Pierre is focusing on other
    areas.
    
    Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
    Acked-by: Eric Farman <farman@linux.ibm.com>
    Acked-by: Halil Pasic <pasic@linux.ibm.com>
    Acked-by: Pierre Morel <pmorel@linux.ibm.com>
    Acked-by: Jason J. Herne <jjherne@linux.ibm.com>
    Link: https://lore.kernel.org/r/1616679712-7139-1-git-send-email-mjrosato@linux.ibm.com
    Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
    rosatomj authored and hcahca committed Mar 28, 2021

Commits on Mar 27, 2021

  1. io_uring: remove unsued assignment to pointer io

    There is an assignment to io that is never read after the assignment,
    the assignment is redundant and can be removed.
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Colin Ian King authored and axboe committed Mar 27, 2021
  2. io_uring: don't cancel extra on files match

    As tasks always wait and kill their io-wq on exec/exit, files are of no
    more concern to us, so we don't need to specifically cancel them by hand
    in those cases. Moreover we should not, because io_match_task() looks at
    req->task->files now, which is always true and so leads to extra
    cancellations, that wasn't a case before per-task io-wq.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/0566c1de9b9dd417f5de345c817ca953580e0e2e.1616696997.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    isilence authored and axboe committed Mar 27, 2021
  3. io_uring: don't cancel-track common timeouts

    Don't account usual timeouts (i.e. not linked) as REQ_F_INFLIGHT but
    keep behaviour prior to dd59a3d ("io_uring: reliably cancel linked
    timeouts").
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/104441ef5d97e3932113d44501fda0df88656b83.1616696997.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    isilence authored and axboe committed Mar 27, 2021
  4. io_uring: do post-completion chore on t-out cancel

    Don't forget about io_commit_cqring() + io_cqring_ev_posted() after
    exit/exec cancelling timeouts. Both functions declared only after
    io_kill_timeouts(), so to avoid tons of forward declarations move
    it down.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/72ace588772c0f14834a6a4185d56c445a366fb4.1616696997.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    isilence authored and axboe committed Mar 27, 2021
  5. io_uring: fix timeout cancel return code

    When we cancel a timeout we should emit a sensible return code, like
    -ECANCELED but not 0, otherwise it may trick users.
    
    Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
    Link: https://lore.kernel.org/r/7b0ad1065e3bd1994722702bd0ba9e7bc9b0683b.1616696997.git.asml.silence@gmail.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    isilence authored and axboe committed Mar 27, 2021
  6. Revert "signal: don't allow STOP on PF_IO_WORKER threads"

    This reverts commit 4db4b1a.
    
    The IO threads allow and handle SIGSTOP now, so don't special case them
    anymore in task_set_jobctl_pending().
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  7. Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for…

    … freezing"
    
    This reverts commit 15b2219.
    
    Before IO threads accepted signals, the freezer using take signals to wake
    up an IO thread would cause them to loop without any way to clear the
    pending signal. That is no longer the case, so stop special casing
    PF_IO_WORKER in the freezer.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  8. Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"

    This reverts commit 6fb8f43.
    
    The IO threads do allow signals now, including SIGSTOP, and we can allow
    ptrace attach. Attaching won't reveal anything interesting for the IO
    threads, but it will allow eg gdb to attach to a task with io_urings
    and IO threads without complaining. And once attached, it will allow
    the usual introspection into regular threads.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  9. Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

    This reverts commit 5be28c8.
    
    IO threads now take signals just fine, so there's no reason to limit them
    specifically. Revert the change that prevented that from happening.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  10. kernel: stop masking signals in create_io_thread()

    This is racy - move the blocking into when the task is created and
    we're marking it as PF_IO_WORKER anyway. The IO threads are now
    prepared to handle signals like SIGSTOP as well, so clear that from
    the mask to allow proper stopping of IO threads.
    
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Reported-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  11. io_uring: handle signals for IO threads like a normal thread

    We go through various hoops to disallow signals for the IO threads, but
    there's really no reason why we cannot just allow them. The IO threads
    never return to userspace like a normal thread, and hence don't go through
    normal signal processing. Instead, just check for a pending signal as part
    of the work loop, and call get_signal() to handle it for us if anything
    is pending.
    
    With that, we can support receiving signals, including special ones like
    SIGSTOP.
    
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    axboe committed Mar 27, 2021
  12. block: don't create too many partitions

    Commit a33df75 ("block: use an xarray for disk->part_tbl") drops the
    check on max supported number of partitionsr, and allows partition with
    bigger partition numbers to be added. However, ->bd_partno is defined as
    u8, so partition index of xarray table may not match with ->bd_partno.
    Then delete_partition() may delete one unmatched partition, and caused
    use-after-free.
    
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Reported-by: syzbot+8fede7e30c7cee0de139@syzkaller.appspotmail.com
    Fixes: a33df75 ("block: use an xarray for disk->part_tbl")
    Signed-off-by: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Ming Lei authored and axboe committed Mar 27, 2021

Commits on Mar 26, 2021

  1. smb3: fix cached file size problems in duplicate extents (reflink)

    There were two problems (one of which could cause data corruption)
    that were noticed with duplicate extents (ie reflink)
    when debugging why various xfstests were being incorrectly skipped
    (e.g. generic/138, generic/140, generic/142). First, we were not
    updating the file size locally in the cache when extending a
    file due to reflink (it would refresh after actimeo expires)
    but xfstest was checking the size immediately which was still
    0 so caused the test to be skipped.  Second, we were setting
    the target file size (which could shrink the file) in all cases
    to the end of the reflinked range rather than only setting the
    target file size when reflink would extend the file.
    
    CC: <stable@vger.kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Steve French committed Mar 26, 2021
Older