1. Aug 05, 2022
    • Ye Bin's avatar
      f2fs: fix null-ptr-deref in f2fs_get_dnode_of_data · 4a2c5b79
      Ye Bin authored
      There is issue as follows when test f2fs atomic write:
      F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th superblock
      F2FS-fs (loop0): invalid crc_offset: 0
      F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix.
      F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix.
      ==================================================================
      BUG: KASAN: null-ptr-deref in f2fs_get_dnode_of_data+0xac/0x16d0
      Read of size 8 at addr 0000000000000028 by task rep/1990
      
      CPU: 4 PID: 1990 Comm: rep Not tainted 5.19.0-rc6-next-20220715 #266
      Call Trace:
       <TASK>
       dump_stack_lvl+0x6e/0x91
       print_report.cold+0x49a/0x6bb
       kasan_report+0xa8/0x130
       f2fs_get_dnode_of_data+0xac/0x16d0
       f2fs_do_write_data_page+0x2a5/0x1030
       move_data_page+0x3c5/0xdf0
       do_garbage_collect+0x2015/0x36c0
       f2fs_gc+0x554/0x1d30
       f2fs_balance_fs+0x7f5/0xda0
       f2fs_write_single_data_page+0xb66/0xdc0
       f2fs_write_cache_pages+0x716/0x1420
       f2fs_write_data_pages+0x84f/0x9a0
       do_writepages+0x130/0x3a0
       filemap_fdatawrite_wbc+0x87/0xa0
       file_write_and_wait_range+0x157/0x1c0
       f2fs_do_sync_file+0x206/0x12d0
       f2fs_sync_file+0x99/0xc0
       vfs_fsync_range+0x75/0x140
       f2fs_file_write_iter+0xd7b/0x1850
       vfs_write+0x645/0x780
       ksys_write+0xf1/0x1e0
       do_syscall_64+0x3b/0x90
       entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      As 3db1de0e commit changed atomic write way which new a cow_inode for
      atomic write file, and also mark cow_inode as FI_ATOMIC_FILE.
      When f2fs_do_write_data_page write cow_inode will use cow_inode's cow_inode
      which is NULL. Then will trigger null-ptr-deref.
      To solve above issue, introduce FI_COW_FILE flag for COW inode.
      
      Fiexes: 3db1de0e
      
      ("f2fs: change the current atomic write way")
      Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
      Reviewed-by: default avatarChao Yu <chao@kernel.org>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      4a2c5b79
    • Daeho Jeong's avatar
      f2fs: revive F2FS_IOC_ABORT_VOLATILE_WRITE · 23339e57
      Daeho Jeong authored
      
      
      F2FS_IOC_ABORT_VOLATILE_WRITE was used to abort a atomic write before.
      However it was removed accidentally. So revive it by changing the name,
      since volatile write had gone.
      
      Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
      Fiexes: 7bc155fe
      
      ("f2fs: kill volatile write support")
      Reviewed-by: default avatarChao Yu <chao@kernel.org>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      23339e57
  2. Jul 31, 2022
  3. Jun 29, 2022
  4. Jun 26, 2022
    • Eric Biggers's avatar
      f2fs: use the updated test_dummy_encryption helper functions · c5bca38d
      Eric Biggers authored
      
      
      Switch f2fs over to the functions that are replacing
      fscrypt_set_test_dummy_encryption().  Since f2fs hasn't been converted
      to the new mount API yet, this doesn't really provide a benefit for
      f2fs.  But it allows fscrypt_set_test_dummy_encryption() to be removed.
      
      Also take the opportunity to eliminate an #ifdef.
      
      Reviewed-by: default avatarChao Yu <chao@kernel.org>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      c5bca38d
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 0840a791
      Linus Torvalds authored
      Pull IIO driver fixes from Greg KH:
       "Here are a set of IIO driver fixes for 5.19-rc4. Jonathan said it best
        in his pull request to me, so I'll just quote it here below, as that's
        the only changes we have right now for the char-misc driver tree:
      
        testing:
            - Fix a missing MODULE_LICENSE() warning by restricting possible
              build configs.
      
        Various drivers:
            - Fix ordering of iio_get_trigger() being called before
              iio_trigger_register()
      
        adi,admv1014:
            - Fix dubious x & !y warning.
      
        adi,axi-adc:
            - Fix missing of_node_put() in error and normal paths.
      
        aspeed,adc:
            - Add missing of_node_put()
      
        fsl,mma8452:
            - Fix broken probing from device tree.
            - Drop check on return value of i2c write to device to cause reset
              as ACK will be missing (device reset before sending it).
      
        fsl,vf610:
            - Fix documentation of in_conversion_mode ABI.
      
        iio-trig-sysfs:
            - Ensure irq work has finished before freeing the trigger.
      
        invensense,mpu3050:
            - Disable regulators in error path.
      
        invensense,icm42600:
            - Fix collision of enum value of 0 with error path where 0 is no
              match.
      
        renesas,rzg2l_Adc:
            - Add missing fwnode_handle_put() in error path.
      
        rescale:
            - Fix a boolean logic bug for detection of raw + scale affecting
              an obscure corner case.
      
        semtech,sx9324:
            - Check return value of read of pin_defs
      
        st,stm32-adc:
            - Fix interaction across ADC instances for some supported devices.
            - Drop false spurious IRQ messages.
            - Fix calibration value handling. If we can't calibrate don't
              expose the vref_int channel.
            - Fix maximum clock rate for stm32pm15x
      
        ti,ads131e08:
            - Add missing fwnode_handle_put() in error paths.
      
        xilinx,ams:
            - Fix variable checked for error from platform_get_irq()
      
        x-powers,axp288:
            - Overide TS_PIN bias current for boards where it is not correctly
              initialized.
      
        yamaha,yas530:
            - Fix inverted check on calibration data being all zeros.
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'char-misc-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (26 commits)
        iio:proximity:sx9324: Check ret value of device_property_read_u32_array()
        iio: accel: mma8452: ignore the return value of reset operation
        iio: adc: stm32: fix maximum clock rate for stm32mp15x
        iio: adc: stm32: fix vrefint wrong calibration value handling
        iio: imu: inv_icm42600: Fix broken icm42600 (chip id 0 value)
        iio: adc: vf610: fix conversion mode sysfs node name
        iio: adc: adi-axi-adc: Fix refcount leak in adi_axi_adc_attach_client
        iio: test: fix missing MODULE_LICENSE for IIO_RESCALE=m
        iio:humidity:hts221: rearrange iio trigger get and register
        iio:chemical:ccs811: rearrange iio trigger get and register
        iio:accel:mxc4005: rearrange iio trigger get and register
        iio:accel:kxcjk-1013: rearrange iio trigger get and register
        iio:accel:bma180: rearrange iio trigger get and register
        iio: afe: rescale: Fix boolean logic bug
        iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data
        iio: adc: stm32: Fix IRQs on STM32F4 by removing custom spurious IRQs message
        iio: adc: stm32: Fix ADCs iteration in irq handler
        iio: adc: ti-ads131e08: add missing fwnode_handle_put() in ads131e08_alloc_channels()
        iio: adc: rzg2l_adc: add missing fwnode_handle_put() in rzg2l_adc_parse_properties()
        iio: trigger: sysfs: fix use-after-free on remove
        ...
      0840a791
    • Linus Torvalds's avatar
      Merge tag 'usb-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c24eb8d6
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some small USB driver fixes and new device ids for 5.19-rc4
        for a few small reported issues. They include:
      
         - new usb-serial driver ids
      
         - MAINTAINERS file update to properly catch the USB dts files
      
         - dt-bindings fixes for reported build warnings
      
         - xhci driver fixes for reported problems
      
         - typec Kconfig dependancy fix
      
         - raw_gadget fuzzing fixes found by syzbot
      
         - chipidea driver bugfix
      
         - usb gadget uvc bugfix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: chipidea: udc: check request status before setting device address
        USB: gadget: Fix double-free bug in raw_gadget driver
        xhci-pci: Allow host runtime PM as default for Intel Meteor Lake xHCI
        xhci-pci: Allow host runtime PM as default for Intel Raptor Lake xHCI
        xhci: turn off port power in shutdown
        xhci: Keep interrupt disabled in initialization until host is running.
        USB: serial: option: add Quectel RM500K module support
        USB: serial: option: add Quectel EM05-G modem
        USB: serial: pl2303: add support for more HXN (G) types
        usb: typec: wcove: Drop wrong dependency to INTEL_SOC_PMIC
        usb: gadget: uvc: fix list double add in uvcg_video_pump
        dt-bindings: usb: ehci: Increase the number of PHYs
        dt-bindings: usb: ohci: Increase the number of PHYs
        usb: gadget: Fix non-unique driver names in raw-gadget driver
        MAINTAINERS: add include/dt-bindings/usb to USB SUBSYSTEM
        USB: serial: option: add Telit LE910Cx 0x1250 composition
      c24eb8d6
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-5.19-3' of... · cb84318b
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Some bug fixes and a trivial cleanup"
      
      * tag 'loongarch-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: Make compute_return_era() return void
        LoongArch: Fix wrong fpu version
        LoongArch: Fix EENTRY/MERRENTRY setting in setup_tlb_handler()
        LoongArch: Fix sleeping in atomic context in setup_tlb_handler()
        LoongArch: Fix the _stext symbol address
        LoongArch: Fix the !THP build
      cb84318b
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 29eeafc6
      Linus Torvalds authored
      Pull f2fs fixes from Jaegeuk Kim:
       "Some urgent fixes to avoid generating corrupted inodes caused by
        compressed and inline_data files.
      
        In addition, avoid a wrong error report which prevents a roll-forward
        recovery"
      
      * tag 'f2fs-for-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
        f2fs: do not count ENOENT for error case
        f2fs: fix iostat related lock protection
        f2fs: attach inline_data after setting compression
      29eeafc6
  5. Jun 25, 2022