1. 26 Mar, 2021 8 commits
  2. 22 Mar, 2021 3 commits
    • Mikulas Patocka's avatar
      dm: don't report "detected capacity change" on device creation · 5424a0b8
      Mikulas Patocka authored
      When a DM device is first created it doesn't yet have an established
      capacity, therefore the use of set_capacity_and_notify() should be
      conditional given the potential for needless pr_info "detected
      capacity change" noise even if capacity is 0.
      
      One could argue that the pr_info() in set_capacity_and_notify() is
      misplaced, but that position is not held uniformly.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Fixes: f64d9b2e ("dm: use set_capacity_and_notify")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      5424a0b8
    • Shin'ichiro Kawasaki's avatar
      dm table: Fix zoned model check and zone sectors check · 2d669ceb
      Shin'ichiro Kawasaki authored
      Commit 24f6b603 ("dm table: fix zoned iterate_devices based device
      capability checks") triggered dm table load failure when dm-zoned device
      is set up for zoned block devices and a regular device for cache.
      
      The commit inverted logic of two callback functions for iterate_devices:
      device_is_zoned_model() and device_matches_zone_sectors(). The logic of
      device_is_zoned_model() was inverted then all destination devices of all
      targets in dm table are required to have the expected zoned model. This
      is fine for dm-linear, dm-flakey and dm-crypt on zoned block devices
      since each target has only one destination device. However, this results
      in failure for dm-zoned with regular cache device since that target has
      both regular block device and zoned block devices.
      
      As for device_matches_zone_sectors(), the commit inverted the logic to
      require all zoned block devices in each target have the specified
      zone_sectors. This check also fails for regular block device which does
      not have zones.
      
      To avoid the check failures, fix the zone model check and the zone
      sectors check. For zone model check, introduce the new feature flag
      DM_TARGET_MIXED_ZONED_MODEL, and set it to dm-zoned target. When the
      target has this flag, allow it to have destination devices with any
      zoned model. For zone sectors check, skip the check if the destination
      device is not a zoned block device. Also add comments and improve an
      error message to clarify expectations to the two checks.
      
      Fixes: 24f6b603 ("dm table: fix zoned iterate_devices based device capability checks")
      Signed-off-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      2d669ceb
    • JeongHyeon Lee's avatar
      dm verity: fix DM_VERITY_OPTS_MAX value · 160f99db
      JeongHyeon Lee authored
      Three optional parameters must be accepted at once in a DM verity table, e.g.:
        (verity_error_handling_mode) (ignore_zero_block) (check_at_most_once)
      Fix this to be possible by incrementing DM_VERITY_OPTS_MAX.
      Signed-off-by: default avatarJeongHyeon Lee <jhs2.lee@samsung.com>
      Fixes: 843f38d3 ("dm verity: add 'check_at_most_once' option to only validate hashes once")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      160f99db
  3. 21 Mar, 2021 23 commits
  4. 20 Mar, 2021 6 commits
    • Thomas Gleixner's avatar
      genirq: Disable interrupts for force threaded handlers · 81e2073c
      Thomas Gleixner authored
      With interrupt force threading all device interrupt handlers are invoked
      from kernel threads. Contrary to hard interrupt context the invocation only
      disables bottom halfs, but not interrupts. This was an oversight back then
      because any code like this will have an issue:
      
      thread(irq_A)
        irq_handler(A)
          spin_lock(&foo->lock);
      
      interrupt(irq_B)
        irq_handler(B)
          spin_lock(&foo->lock);
      
      This has been triggered with networking (NAPI vs. hrtimers) and console
      drivers where printk() happens from an interrupt which interrupted the
      force threaded handler.
      
      Now people noticed and started to change the spin_lock() in the handler to
      spin_lock_irqsave() which affects performance or add IRQF_NOTHREAD to the
      interrupt request which in turn breaks RT.
      
      Fix the root cause and not the symptom and disable interrupts before
      invoking the force threaded handler which preserves the regular semantics
      and the usefulness of the interrupt force threading as a general debugging
      tool.
      
      For not RT this is not changing much, except that during the execution of
      the threaded handler interrupts are delayed until the handler
      returns. Vs. scheduling and softirq processing there is no difference.
      
      For RT kernels there is no issue.
      
      Fixes: 8d32a307 ("genirq: Provide forced interrupt threading")
      Reported-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
      Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: https://lore.kernel.org/r/20210317143859.513307808@linutronix.de
      81e2073c
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 812da4d3
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "A handful of fixes for 5.12:
      
         - fix the SBI remote fence numbers for hypervisor fences, which had
           been transcribed in the wrong order in Linux. These fences are only
           used with the KVM patches applied.
      
         - fix a whole host of build warnings, these should have no functional
           change.
      
         - fix init_resources() to prevent an off-by-one error from causing an
           out-of-bounds array reference. This was manifesting during boot on
           vexriscv.
      
         - ensure the KASAN mappings are visible before proceeding to use
           them"
      
      * tag 'riscv-for-linus-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Correct SPARSEMEM configuration
        RISC-V: kasan: Declare kasan_shallow_populate() static
        riscv: Ensure page table writes are flushed when initializing KASAN vmalloc
        RISC-V: Fix out-of-bounds accesses in init_resources()
        riscv: Fix compilation error with Canaan SoC
        ftrace: Fix spelling mistake "disabed" -> "disabled"
        riscv: fix bugon.cocci warnings
        riscv: process: Fix no prototype for arch_dup_task_struct
        riscv: ftrace: Use ftrace_get_regs helper
        riscv: process: Fix no prototype for show_regs
        riscv: syscall_table: Reduce W=1 compilation warnings noise
        riscv: time: Fix no prototype for time_init
        riscv: ptrace: Fix no prototype warnings
        riscv: sbi: Fix comment of __sbi_set_timer_v01
        riscv: irq: Fix no prototype warning
        riscv: traps: Fix no prototype warnings
        RISC-V: correct enum sbi_ext_rfence_fid
      812da4d3
    • Linus Torvalds's avatar
      Merge tag '5.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6 · bfdc4aa9
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Five cifs/smb3 fixes - three for stable, including an important ACL
        fix and security signature fix"
      
      * tag '5.12-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix allocation size on newly created files
        cifs: warn and fail if trying to use rootfs without the config option
        fs/cifs/: fix misspellings using codespell tool
        cifs: Fix preauth hash corruption
        cifs: update new ACE pointer after populate_new_aces.
      bfdc4aa9
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · af97713d
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Eight fixes, all in drivers, all fairly minor either being fixes in
        error legs, memory leaks on teardown, context errors or semantic
        problems"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: mpt3sas: Do not use GFP_KERNEL in atomic context
        scsi: ufs: ufs-mediatek: Correct operator & -> &&
        scsi: sd_zbc: Update write pointer offset cache
        scsi: lpfc: Fix some error codes in debugfs
        scsi: qla2xxx: Fix broken #endif placement
        scsi: st: Fix a use after free in st_open()
        scsi: myrs: Fix a double free in myrs_cleanup()
        scsi: ibmvfc: Free channel_setup_buf during device tear down
      af97713d
    • Linus Torvalds's avatar
      Merge tag 'zonefs-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 1c273e10
      Linus Torvalds authored
      Pull zonefs fixes from Damien Le Moal:
      
       - fix inode write open reference count (Chao)
      
       - Fix wrong write offset for asynchronous O_APPEND writes (me)
      
       - Prevent use of sequential zone file as swap files (me)
      
      * tag 'zonefs-5.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: fix to update .i_wr_refcnt correctly in zonefs_open_zone()
        zonefs: Fix O_APPEND async write handling
        zonefs: prevent use of seq files as swap file
      1c273e10
    • Linus Torvalds's avatar
      Merge tag 'block-5.12-2021-03-19' of git://git.kernel.dk/linux-block · d626c692
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Just an NVMe pull request this week:
      
         - fix tag allocation for keep alive
      
         - fix a unit mismatch for the Write Zeroes limits
      
         - various TCP transport fixes (Sagi Grimberg, Elad Grupi)
      
         - fix iosqes and iocqes validation for discovery controllers (Sagi Grimberg)"
      
      * tag 'block-5.12-2021-03-19' of git://git.kernel.dk/linux-block:
        nvmet-tcp: fix kmap leak when data digest in use
        nvmet: don't check iosqes,iocqes for discovery controllers
        nvme-rdma: fix possible hang when failing to set io queues
        nvme-tcp: fix possible hang when failing to set io queues
        nvme-tcp: fix misuse of __smp_processor_id with preemption enabled
        nvme-tcp: fix a NULL deref when receiving a 0-length r2t PDU
        nvme: fix Write Zeroes limitations
        nvme: allocate the keep alive request using BLK_MQ_REQ_NOWAIT
        nvme: merge nvme_keep_alive into nvme_keep_alive_work
        nvme-fabrics: only reserve a single tag
      d626c692