Skip to content
  1. Dec 09, 2022
    • Jan Kara's avatar
      udf: Fix extending file within last block · 1f3868f0
      Jan Kara authored
      
      
      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: default avatarJan Kara <jack@suse.cz>
      1f3868f0
    • Jan Kara's avatar
      udf: Discard preallocation before extending file with a hole · 16d05565
      Jan Kara authored
      
      
      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: default avatarJan Kara <jack@suse.cz>
      16d05565
    • Jan Kara's avatar
      udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size · 6ad53f0f
      Jan Kara authored
      
      
      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: default avatarJan Kara <jack@suse.cz>
      6ad53f0f
    • Jan Kara's avatar
      udf: Fix preallocation discarding at indirect extent boundary · cfe4c1b2
      Jan Kara authored
      
      
      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: default avatarJan Kara <jack@suse.cz>
      cfe4c1b2
  2. Dec 05, 2022
    • Bartosz Taudul's avatar
      udf: Increase UDF_MAX_READ_VERSION to 0x0260 · 7868f930
      Bartosz Taudul authored
      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.pdf
      
      
      
      Signed-off-by: default avatarBartosz Taudul <wolf@nereid.pl>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      7868f930
  3. Nov 28, 2022
    • Rong Tao's avatar
      fs/ext2: Fix code indentation · b41b98e1
      Rong Tao authored
      
      
      ts=4 can cause misunderstanding in code reading. It is better to replace
      8 spaces with one tab.
      
      Signed-off-by: default avatarRong Tao <rongtao@cestc.cn>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      b41b98e1
    • Al Viro's avatar
      ext2: unbugger ext2_empty_dir() · 27e714c0
      Al Viro authored
      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: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      27e714c0
  4. Nov 21, 2022
  5. Nov 11, 2022
  6. Oct 25, 2022
    • Jan Kara's avatar
      maintainers: Add ISOFS entry · ab7720a2
      Jan Kara authored
      
      
      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: default avatarJan Kara <jack@suse.cz>
      ab7720a2
  7. Oct 24, 2022
  8. Oct 23, 2022
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v6.1-rc2' of... · d47136c2
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · cda5d920
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · fd79882f
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'media/v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 3272eb1a
      Linus Torvalds authored
      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. Oct 22, 2022