1. 28 Nov, 2022 1 commit
    • 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
  2. 21 Nov, 2022 3 commits
  3. 11 Nov, 2022 1 commit
  4. 25 Oct, 2022 1 commit
    • 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
  5. 24 Oct, 2022 2 commits
    • Shigeru Yoshida's avatar
      udf: Avoid double brelse() in udf_rename() · c791730f
      Shigeru Yoshida authored
      syzbot reported a warning like below [1]:
      
      VFS: brelse: Trying to free free buffer
      WARNING: CPU: 2 PID: 7301 at fs/buffer.c:1145 __brelse+0x67/0xa0
      ...
      Call Trace:
       <TASK>
       invalidate_bh_lru+0x99/0x150
       smp_call_function_many_cond+0xe2a/0x10c0
       ? generic_remap_file_range_prep+0x50/0x50
       ? __brelse+0xa0/0xa0
       ? __mutex_lock+0x21c/0x12d0
       ? smp_call_on_cpu+0x250/0x250
       ? rcu_read_lock_sched_held+0xb/0x60
       ? lock_release+0x587/0x810
       ? __brelse+0xa0/0xa0
       ? generic_remap_file_range_prep+0x50/0x50
       on_each_cpu_cond_mask+0x3c/0x80
       blkdev_flush_mapping+0x13a/0x2f0
       blkdev_put_whole+0xd3/0xf0
       blkdev_put+0x222/0x760
       deactivate_locked_super+0x96/0x160
       deactivate_super+0xda/0x100
       cleanup_mnt+0x222/0x3d0
       task_work_run+0x149/0x240
       ? task_work_cancel+0x30/0x30
       do_exit+0xb29/0x2a40
       ? reacquire_held_locks+0x4a0/0x4a0
       ? do_raw_spin_lock+0x12a/0x2b0
       ? mm_update_next_owner+0x7c0/0x7c0
       ? rwlock_bug.part.0+0x90/0x90
       ? zap_other_threads+0x234/0x2d0
       do_group_exit+0xd0/0x2a0
       __x64_sys_exit_group+0x3a/0x50
       do_syscall_64+0x34/0xb0
       entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      The cause of the issue is that brelse() is called on both ofibh.sbh
      and ofibh.ebh by udf_find_entry() when it returns NULL.  However,
      brelse() is called by udf_rename(), too.  So, b_count on buffer_head
      becomes unbalanced.
      
      This patch fixes the issue by not calling brelse() by udf_rename()
      when udf_find_entry() returns NULL.
      
      Link: https://syzkaller.appspot.com/bug?id=8297f45698159c6bca8a1f87dc983667c1a1c851 [1]
      Reported-by: syzbot+7902cd7684bc35306224@syzkaller.appspotmail.com
      Signed-off-by: default avatarShigeru Yoshida <syoshida@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20221023095741.271430-1-syoshida@redhat.com
      c791730f
    • Li zeming's avatar
      fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function · 0dafb7e6
      Li zeming authored
      These two functions perform the following optimizations.
      1. Delete the type cast of foo pointer. Void * does not need to convert
      the type.
      2. Delete the initialization assignment of bh variable, which is
      assigned first.
      Signed-off-by: default avatarLi zeming <zeming@nfschina.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20221012104235.3331-1-zeming@nfschina.com
      0dafb7e6
  6. 23 Oct, 2022 9 commits
  7. 22 Oct, 2022 21 commits
  8. 21 Oct, 2022 2 commits
    • Linus Torvalds's avatar
      Merge tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · bd8e9634
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
      
       - memory leak fixes
      
       - fixes for directory leases, including an important one which fixes a
         problem noticed by git functional tests
      
       - fixes relating to missing free_xid calls (helpful for
         tracing/debugging of entry/exit into cifs.ko)
      
       - a multichannel fix
      
       - a small cleanup fix (use of list_move instead of list_del/list_add)
      
      * tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: fix memory leaks in session setup
        cifs: drop the lease for cached directories on rmdir or rename
        smb3: interface count displayed incorrectly
        cifs: Fix memory leak when build ntlmssp negotiate blob failed
        cifs: set rc to -ENOENT if we can not get a dentry for the cached dir
        cifs: use LIST_HEAD() and list_move() to simplify code
        cifs: Fix xid leak in cifs_get_file_info_unix()
        cifs: Fix xid leak in cifs_ses_add_channel()
        cifs: Fix xid leak in cifs_flock()
        cifs: Fix xid leak in cifs_copy_file_range()
        cifs: Fix xid leak in cifs_create()
      bd8e9634
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 022c028f
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
       "Fixes for patches merged in v6.1"
      
      * tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        nfsd: ensure we always call fh_verify_error tracepoint
        NFSD: unregister shrinker when nfsd_init_net() fails
      022c028f