1. 26 Jun, 2024 1 commit
  2. 25 Jun, 2024 3 commits
  3. 23 Jun, 2024 8 commits
  4. 22 Jun, 2024 1 commit
  5. 21 Jun, 2024 7 commits
    • Youling Tang's avatar
      bcachefs: Move the ei_flags setting to after initialization · bd4da046
      Youling Tang authored
      `inode->ei_flags` setting and cleaning should be done after initialization,
      otherwise the operation is invalid.
      
      Fixes: 9ca4853b ("bcachefs: Fix quota support for snapshots")
      Signed-off-by: default avatarYouling Tang <tangyouling@kylinos.cn>
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      bd4da046
    • Kent Overstreet's avatar
      bcachefs: Fix a UAF after write_super() · 2fe79ce7
      Kent Overstreet authored
      write_super() may reallocate the superblock buffer - but
      bch_sb_field_ext was referencing it; don't use it after the write_super
      call.
      
      Reported-by: syzbot+8992fc10a192067b8d8a@syzkaller.appspotmail.com
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      2fe79ce7
    • Kent Overstreet's avatar
      bcachefs: Use bch2_print_string_as_lines for long err · e6b3a655
      Kent Overstreet authored
      printk strings get truncated to 1024 bytes; if we have a long error
      message (journal debug info) we need to use a helper.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      e6b3a655
    • Kent Overstreet's avatar
      bcachefs: Fix I_NEW warning in race path in bch2_inode_insert() · dd908648
      Kent Overstreet authored
      discard_new_inode() is the correct interface for tearing down an indoe
      that was fully created but not made visible to other threads, but it
      expects I_NEW to be set, which we don't use.
      
      Reported-by: https://github.com/koverstreet/bcachefs/issues/690
      Fixes: bcachefs: Fix race path in bch2_inode_insert()
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      dd908648
    • Kent Overstreet's avatar
    • Kent Overstreet's avatar
      bcachefs: Fix missing alloc_data_type_set() · f648b6c1
      Kent Overstreet authored
      Incorrect bucket state transition in the discard path; when incrementing
      a bucket's generation number that had already been discarded, we were
      forgetting to check if it should be need_gc_gens, not free.
      
      This was caught by the .invalid checks in the transaction commit path,
      causing us to go emergency read only.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      f648b6c1
    • Kent Overstreet's avatar
      closures: Change BUG_ON() to WARN_ON() · 339b84ab
      Kent Overstreet authored
      If a BUG_ON() can be hit in the wild, it shouldn't be a BUG_ON()
      
      For reference, this has popped up once in the CI, and we'll need more
      info to debug it:
      
      03240 ------------[ cut here ]------------
      03240 kernel BUG at lib/closure.c:21!
      03240 kernel BUG at lib/closure.c:21!
      03240 Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
      03240 Modules linked in:
      03240 CPU: 15 PID: 40534 Comm: kworker/u80:1 Not tainted 6.10.0-rc4-ktest-ga56da697 #25570
      03240 Hardware name: linux,dummy-virt (DT)
      03240 Workqueue: btree_update btree_interior_update_work
      03240 pstate: 00001005 (nzcv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
      03240 pc : closure_put+0x224/0x2a0
      03240 lr : closure_put+0x24/0x2a0
      03240 sp : ffff0000d12071c0
      03240 x29: ffff0000d12071c0 x28: dfff800000000000 x27: ffff0000d1207360
      03240 x26: 0000000000000040 x25: 0000000000000040 x24: 0000000000000040
      03240 x23: ffff0000c1f20180 x22: 0000000000000000 x21: ffff0000c1f20168
      03240 x20: 0000000040000000 x19: ffff0000c1f20140 x18: 0000000000000001
      03240 x17: 0000000000003aa0 x16: 0000000000003ad0 x15: 1fffe0001c326974
      03240 x14: 0000000000000a1e x13: 0000000000000000 x12: 1fffe000183e402d
      03240 x11: ffff6000183e402d x10: dfff800000000000 x9 : ffff6000183e402e
      03240 x8 : 0000000000000001 x7 : 00009fffe7c1bfd3 x6 : ffff0000c1f2016b
      03240 x5 : ffff0000c1f20168 x4 : ffff6000183e402e x3 : ffff800081391954
      03240 x2 : 0000000000000001 x1 : 0000000000000000 x0 : 00000000a8000000
      03240 Call trace:
      03240  closure_put+0x224/0x2a0
      03240  bch2_check_for_deadlock+0x910/0x1028
      03240  bch2_six_check_for_deadlock+0x1c/0x30
      03240  six_lock_slowpath.isra.0+0x29c/0xed0
      03240  six_lock_ip_waiter+0xa8/0xf8
      03240  __bch2_btree_node_lock_write+0x14c/0x298
      03240  bch2_trans_lock_write+0x6d4/0xb10
      03240  __bch2_trans_commit+0x135c/0x5520
      03240  btree_interior_update_work+0x1248/0x1c10
      03240  process_scheduled_works+0x53c/0xd90
      03240  worker_thread+0x370/0x8c8
      03240  kthread+0x258/0x2e8
      03240  ret_from_fork+0x10/0x20
      03240 Code: aa1303e0 d63f0020 a94363f7 17ffff8c (d4210000)
      03240 ---[ end trace 0000000000000000 ]---
      03240 Kernel panic - not syncing: Oops - BUG: Fatal exception
      03240 SMP: stopping secondary CPUs
      03241 SMP: failed to stop secondary CPUs 13,15
      03241 Kernel Offset: disabled
      03241 CPU features: 0x00,00000003,80000008,4240500b
      03241 Memory Limit: none
      03241 ---[ end Kernel panic - not syncing: Oops - BUG: Fatal exception ]---
      03246 ========= FAILED TIMEOUT copygc_torture_no_checksum in 7200s
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      339b84ab
  6. 20 Jun, 2024 2 commits
    • Youling Tang's avatar
      bcachefs: fix alignment of VMA for memory mapped files on THP · c6cab97c
      Youling Tang authored
      With CONFIG_READ_ONLY_THP_FOR_FS, the Linux kernel supports using THPs
      for read-only mmapped files, such as shared libraries. However, the
      kernel makes no attempt to actually align those mappings on 2MB
      boundaries, which makes it impossible to use those THPs most of the
      time. This issue applies to general file mapping THP as well as
      existing setups using CONFIG_READ_ONLY_THP_FOR_FS. This is easily
      fixed by using thp_get_unmapped_area for the unmapped_area function
      in bcachefs, which is what ext2, ext4, fuse, xfs and btrfs all use.
      
      Similar to commit b0c58223 ("btrfs: fix alignment of VMA for
      memory mapped files on THP").
      Signed-off-by: default avatarYouling Tang <tangyouling@kylinos.cn>
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      c6cab97c
    • Kent Overstreet's avatar
      bcachefs: Fix safe errors by default · 33dfafa9
      Kent Overstreet authored
      i.e. the start of automatic self healing:
      
      If errors=continue or fix_safe, we now automatically fix simple errors
      without user intervention.
      
      New error action option: fix_safe
      
      This replaces the existing errors=ro option, which gets a new slot, i.e.
      existing errors=ro users now get errors=fix_safe.
      
      This is currently only enabled for a limited set of errors - initially
      just disk accounting; errors we would never not want to fix, and we
      don't want to require user intervention (i.e. to make sure a bug report
      gets filed).
      
      Errors will still be counted in the superblock, so we (developers) will
      still know they've been occuring if a bug report gets filed (as bug
      reports typically include the errors superblock section).
      
      Eventually we'll be enabling this for a much wider set of errors, after
      we've done thorough error injection testing.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      33dfafa9
  7. 19 Jun, 2024 13 commits
  8. 16 Jun, 2024 5 commits
    • Linus Torvalds's avatar
      Linux 6.10-rc4 · 6ba59ff4
      Linus Torvalds authored
      6ba59ff4
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.10-rc4' of... · 6456c425
      Linus Torvalds authored
      Merge tag 'parisc-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
      
      Pull parisc fix from Helge Deller:
       "On parisc we have suffered since years from random segfaults which
        seem to have been triggered due to cache inconsistencies. Those
        segfaults happened more often on machines with PA8800 and PA8900 CPUs,
        which have much bigger caches than the earlier machines.
      
        Dave Anglin has worked over the last few weeks to fix this bug. His
        patch has been successfully tested by various people on various
        machines and with various kernels (6.6, 6.8 and 6.9), and the debian
        buildd servers haven't shown a single random segfault with this patch.
      
        Since the cache handling has been reworked, the patch is slightly
        bigger than I would like in this stage, but the greatly improved
        stability IMHO justifies the inclusion now"
      
      * tag 'parisc-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Try to fix random segmentation faults in package builds
      6456c425
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 4301487e
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two fixes to correctly report i2c functionality, ensuring that
        I2C_FUNC_SLAVE is reported when a device operates solely as a slave
        interface"
      
      * tag 'i2c-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: designware: Fix the functionality flags of the slave-only interface
        i2c: at91: Fix the functionality flags of the slave-only interface
      4301487e
    • Linus Torvalds's avatar
      Merge tag 'usb-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · b5beaa44
      Linus Torvalds authored
      Pull USB / Thunderbolt fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for 6.10-rc4.
        Included in here are:
      
         - thunderbolt debugfs bugfix
      
         - USB typec bugfixes
      
         - kcov usb bugfix
      
         - xhci bugfixes
      
         - usb-storage bugfix
      
         - dt-bindings bugfix
      
         - cdc-wdm log message spam bugfix
      
        All of these, except for the last cdc-wdm log level change, have been
        in linux-next for a while with no reported problems. The cdc-wdm
        bugfix has been tested by syzbot and proved to fix the reported cpu
        lockup issues when the log is constantly spammed by a broken device"
      
      * tag 'usb-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages
        xhci: Handle TD clearing for multiple streams case
        xhci: Apply broken streams quirk to Etron EJ188 xHCI host
        xhci: Apply reset resume quirk to Etron EJ188 xHCI host
        xhci: Set correct transferred length for cancelled bulk transfers
        usb-storage: alauda: Check whether the media is initialized
        usb: typec: ucsi: Ack also failed Get Error commands
        kcov, usb: disable interrupts in kcov_remote_start_usb_softirq
        dt-bindings: usb: realtek,rts5411: Add missing "additionalProperties" on child nodes
        usb: typec: tcpm: Ignore received Hard Reset in TOGGLING state
        usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps
        USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected
        usb: typec: ucsi: glink: increase max ports for x1e80100
        Revert "usb: chipidea: move ci_ulpi_init after the phy initialization"
        thunderbolt: debugfs: Fix margin debugfs node creation condition
      b5beaa44
    • Linus Torvalds's avatar
      Merge tag 'tty-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 6efc63a8
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty and serial driver fixes that resolve som
        reported problems. Included in here are:
      
         - n_tty lookahead buffer bugfix
      
         - WARN_ON() removal where it was not needed
      
         - 8250_dw driver bugfixes
      
         - 8250_pxa bugfix
      
         - sc16is7xx Kconfig fixes for reported build issues
      
        All of these have been in linux-next for over a week with no reported
        problems"
      
      * tag 'tty-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: drop debugging WARN_ON_ONCE() from uart_write()
        serial: sc16is7xx: re-add Kconfig SPI or I2C dependency
        serial: sc16is7xx: rename Kconfig CONFIG_SERIAL_SC16IS7XX_CORE
        serial: port: Don't block system suspend even if bytes are left to xmit
        serial: 8250_pxa: Configure tx_loadsz to match FIFO IRQ level
        serial: 8250_dw: Revert "Move definitions to the shared header"
        serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw
        tty: n_tty: Fix buffer offsets when lookahead is used
      6efc63a8