1. 09 12月, 2022 4 次提交
    • J
      udf: Fix extending file within last block · 1f3868f0
      Jan Kara 提交于
      When extending file within last block it can happen that the extent is
      already rounded to the blocksize and thus contains the offset we want to
      grow up to. In such case we would mistakenly expand the last extent and
      make it one block longer than it should be, exposing unallocated block
      in a file and causing data corruption. Fix the problem by properly
      detecting this case and bailing out.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      1f3868f0
    • J
      udf: Discard preallocation before extending file with a hole · 16d05565
      Jan Kara 提交于
      When extending file with a hole, we tried to preserve existing
      preallocation for the file. However that is not very useful and
      complicates code because the previous extent may need to be rounded to
      block boundary as well (which we forgot to do thus causing data
      corruption for sequence like:
      
      xfs_io -f -c "pwrite 0x75e63 11008" -c "truncate 0x7b24b" \
        -c "truncate 0xabaa3" -c "pwrite 0xac70b 22954" \
        -c "pwrite 0x93a43 11358" -c "pwrite 0xb8e65 52211" file
      
      with 512-byte block size. Just discard preallocation before extending
      file to simplify things and also fix this data corruption.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      16d05565
    • J
      udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size · 6ad53f0f
      Jan Kara 提交于
      If rounded block-rounded i_lenExtents matches block rounded i_size,
      there are no preallocation extents. Do not bother walking extent linked
      list.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      6ad53f0f
    • J
      udf: Fix preallocation discarding at indirect extent boundary · cfe4c1b2
      Jan Kara 提交于
      When preallocation extent is the first one in the extent block, the
      code would corrupt extent tree header instead. Fix the problem and use
      udf_delete_aext() for deleting extent to avoid some code duplication.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      cfe4c1b2
  2. 05 12月, 2022 1 次提交
    • B
      udf: Increase UDF_MAX_READ_VERSION to 0x0260 · 7868f930
      Bartosz Taudul 提交于
      Some discs containing the UDF file system are unable to be mounted,
      failing with the following message:
      
        UDF-fs: error (device sr0): udf_fill_super: minUDFReadRev=260
          (max is 250)
      
      The UDF 2.60 specification [0] states in the section Basic Restrictions
      & Requirements (page 10):
      
        The Minimum UDF Read Revision value shall be at most #0250 for all
        media with a UDF 2.60 file system. This indicates that a UDF 2.50
        implementation can read all UDF 2.60 media. Media that do not have a
        Metadata Partition may use a value lower than #250.
      
      The conclusion is that the discs failing to mount were burned with a
      faulty software, which didn't follow the specification. This can be
      worked around by increasing UDF_MAX_READ_VERSION to 0x260, to match the
      Minimum Read Revision. No other changes are required, as reading UDF
      2.60 is backward compatible with UDF 2.50.
      
      [0] http://www.osta.org/specs/pdf/udf260.pdfSigned-off-by: NBartosz Taudul <wolf@nereid.pl>
      Signed-off-by: NJan Kara <jack@suse.cz>
      7868f930
  3. 28 11月, 2022 2 次提交
    • R
      fs/ext2: Fix code indentation · b41b98e1
      Rong Tao 提交于
      ts=4 can cause misunderstanding in code reading. It is better to replace
      8 spaces with one tab.
      Signed-off-by: NRong Tao <rongtao@cestc.cn>
      Signed-off-by: NJan Kara <jack@suse.cz>
      b41b98e1
    • A
      ext2: unbugger ext2_empty_dir() · 27e714c0
      Al Viro 提交于
      In 27cfa258 "ext2: fix fs corruption when trying to remove
      a non-empty directory with IO error" a funny thing has happened:
      
      -               page = ext2_get_page(inode, i, dir_has_error, &page_addr);
      +               page = ext2_get_page(inode, i, 0, &page_addr);
      
       -               if (IS_ERR(page)) {
       -                       dir_has_error = 1;
       -                       continue;
       -               }
       +               if (IS_ERR(page))
       +                       goto not_empty;
      
      And at not_empty: we hit ext2_put_page(page, page_addr), which does
      put_page(page).  Which, unless I'm very mistaken, should oops
      immediately when given ERR_PTR(-E...) as page.
      
      OK, shit happens, insufficiently tested patches included.  But when
      commit in question describes the fault-injection test that exercised
      that particular failure exit...
      
      Ow.
      
      CC: stable@vger.kernel.org
      Fixes: 27cfa258 ("ext2: fix fs corruption when trying to remove a non-empty directory with IO error")
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJan Kara <jack@suse.cz>
      27e714c0
  4. 21 11月, 2022 3 次提交
  5. 11 11月, 2022 1 次提交
  6. 25 10月, 2022 1 次提交
    • J
      maintainers: Add ISOFS entry · ab7720a2
      Jan Kara 提交于
      We miss ISOFS entry in MAINTAINERS file. Add it and write me as the
      maintainer there since ISOFS is pretty low effort these days. Less
      random patches for Andrew to merge ;-).
      Signed-off-by: NJan Kara <jack@suse.cz>
      ab7720a2
  7. 24 10月, 2022 11 次提交
  8. 23 10月, 2022 4 次提交
    • L
      Merge tag 'hwmon-for-v6.1-rc2' of... · d47136c2
      Linus Torvalds 提交于
      Merge tag 'hwmon-for-v6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - corsair-psu: Fix typo in USB id description, and add USB ID for new
         PSU
      
       - pwm-fan: Fix fan power handling when disabling fan control
      
      * tag 'hwmon-for-v6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (corsair-psu) Add USB id of the new HX1500i psu
        hwmon: (pwm-fan) Explicitly switch off fan power when setting pwm1_enable to 0
        hwmon: (corsair-psu) fix typo in USB id description
      d47136c2
    • L
      Merge tag 'i2c-for-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · cda5d920
      Linus Torvalds 提交于
      Pull i2c fixes from Wolfram Sang:
       "RPM fix for qcom-cci, platform module alias for xiic, build warning
        fix for mlxbf, typo fixes in comments"
      
      * tag 'i2c-for-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: mlxbf: depend on ACPI; clean away ifdeffage
        i2c: fix spelling typos in comments
        i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter
        i2c: xiic: Add platform module alias
      cda5d920
    • L
      Merge tag 'pci-v6.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · fd79882f
      Linus Torvalds 提交于
      Pull pci fixes from Bjorn Helgaas:
      
       - Revert a simplification that broke pci-tegra due to a masking error
      
       - Update MAINTAINERS for Kishon's email address change and TI
         DRA7XX/J721E maintainer change
      
      * tag 'pci-v6.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        MAINTAINERS: Update Kishon's email address in PCI endpoint subsystem
        MAINTAINERS: Add Vignesh Raghavendra as maintainer of TI DRA7XX/J721E PCI driver
        Revert "PCI: tegra: Use PCI_CONF1_EXT_ADDRESS() macro"
      fd79882f
    • L
      Merge tag 'media/v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 3272eb1a
      Linus Torvalds 提交于
      Pull missed media updates from Mauro Carvalho Chehab:
       "It seems I screwed-up my previous pull request: it ends up that only
        half of the media patches that were in linux-next got merged in -rc1.
      
        The script which creates the signed tags silently failed due to
        5.19->6.0 so it ended generating a tag with incomplete stuff.
      
        So here are the missing parts:
      
         - a DVB core security fix
      
         - lots of fixes and cleanups for atomisp staging driver
      
         - old drivers that are VB1 are being moved to staging to be
           deprecated
      
         - several driver updates - mostly for embedded systems, but there are
           also some things addressing issues with some PC webcams, in the UVC
           video driver"
      
      * tag 'media/v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (163 commits)
        media: sun6i-csi: Move csi buffer definition to main header file
        media: sun6i-csi: Introduce and use video helper functions
        media: sun6i-csi: Add media ops with link notify callback
        media: sun6i-csi: Remove controls handler from the driver
        media: sun6i-csi: Register the media device after creation
        media: sun6i-csi: Pass and store csi device directly in video code
        media: sun6i-csi: Tidy up video code
        media: sun6i-csi: Tidy up v4l2 code
        media: sun6i-csi: Tidy up Kconfig
        media: sun6i-csi: Use runtime pm for clocks and reset
        media: sun6i-csi: Define and use variant to get module clock rate
        media: sun6i-csi: Always set exclusive module clock rate
        media: sun6i-csi: Tidy up platform code
        media: sun6i-csi: Refactor main driver data structures
        media: sun6i-csi: Define and use driver name and (reworked) description
        media: cedrus: Add a Kconfig dependency on RESET_CONTROLLER
        media: sun8i-rotate: Add a Kconfig dependency on RESET_CONTROLLER
        media: sun8i-di: Add a Kconfig dependency on RESET_CONTROLLER
        media: sun4i-csi: Add a Kconfig dependency on RESET_CONTROLLER
        media: sun6i-csi: Add a Kconfig dependency on RESET_CONTROLLER
        ...
      3272eb1a
  9. 22 10月, 2022 13 次提交