1. Jul 03, 2023
    • Konstantin Komarov's avatar
      fs/ntfs3: Fix ntfs_atomic_open · d6cd7cec
      Konstantin Komarov authored
      
      
      This fixes xfstest 633/696.
      
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      d6cd7cec
    • Konstantin Komarov's avatar
      fs/ntfs3: Correct checking while generating attr_list · 14f527d4
      Konstantin Komarov authored
      
      
      Correct slightly previous commit:
      Enhance sanity check while generating attr_list
      
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      14f527d4
    • Tetsuo Handa's avatar
      fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list() · ea303f72
      Tetsuo Handa authored
      
      
      syzbot is reporting too large allocation at ntfs_load_attr_list(), for
      a crafted filesystem can have huge data_size.
      
      Reported-by: default avatarsyzbot <syzbot+89dbb3a789a5b9711793@syzkaller.appspotmail.com>
      Link: https://syzkaller.appspot.com/bug?extid=89dbb3a789a5b9711793
      
      
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      ea303f72
    • Jia-Ju Bai's avatar
      fs: ntfs3: Fix possible null-pointer dereferences in mi_read() · 97498cd6
      Jia-Ju Bai authored
      In a previous commit 2681631c
      
       ("fs/ntfs3: Add null pointer check to
      attr_load_runs_vcn"), ni can be NULL in attr_load_runs_vcn(), and thus it
      should be checked before being used.
      
      However, in the call stack of this commit, mft_ni in mi_read() is
      aliased with ni in attr_load_runs_vcn(), and it is also used in
      mi_read() at two places:
      
      mi_read()
        rw_lock = &mft_ni->file.run_lock -> No check
        attr_load_runs_vcn(mft_ni, ...)
          ni (namely mft_ni) is checked in the previous commit
        attr_load_runs_vcn(..., &mft_ni->file.run) -> No check
      
      Thus, to avoid possible null-pointer dereferences, the related checks
      should be added.
      
      These bugs are reported by a static analysis tool implemented by myself,
      and they are found by extending a known bug fixed in the previous commit.
      Thus, they could be theoretical bugs.
      
      Signed-off-by: default avatarJia-Ju Bai <baijiaju@buaa.edu.cn>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      97498cd6
    • Edward Lo's avatar
      fs/ntfs3: Return error for inconsistent extended attributes · c9db0ff0
      Edward Lo authored
      
      
      ntfs_read_ea is called when we want to read extended attributes. There
      are some sanity checks for the validity of the EAs. However, it fails to
      return a proper error code for the inconsistent attributes, which might
      lead to unpredicted memory accesses after return.
      
      [  138.916927] BUG: KASAN: use-after-free in ntfs_set_ea+0x453/0xbf0
      [  138.923876] Write of size 4 at addr ffff88800205cfac by task poc/199
      [  138.931132]
      [  138.933016] CPU: 0 PID: 199 Comm: poc Not tainted 6.2.0-rc1+ #4
      [  138.938070] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
      [  138.947327] Call Trace:
      [  138.949557]  <TASK>
      [  138.951539]  dump_stack_lvl+0x4d/0x67
      [  138.956834]  print_report+0x16f/0x4a6
      [  138.960798]  ? ntfs_set_ea+0x453/0xbf0
      [  138.964437]  ? kasan_complete_mode_report_info+0x7d/0x200
      [  138.969793]  ? ntfs_set_ea+0x453/0xbf0
      [  138.973523]  kasan_report+0xb8/0x140
      [  138.976740]  ? ntfs_set_ea+0x453/0xbf0
      [  138.980578]  __asan_store4+0x76/0xa0
      [  138.984669]  ntfs_set_ea+0x453/0xbf0
      [  138.988115]  ? __pfx_ntfs_set_ea+0x10/0x10
      [  138.993390]  ? kernel_text_address+0xd3/0xe0
      [  138.998270]  ? __kernel_text_address+0x16/0x50
      [  139.002121]  ? unwind_get_return_address+0x3e/0x60
      [  139.005659]  ? __pfx_stack_trace_consume_entry+0x10/0x10
      [  139.010177]  ? arch_stack_walk+0xa2/0x100
      [  139.013657]  ? filter_irq_stacks+0x27/0x80
      [  139.017018]  ntfs_setxattr+0x405/0x440
      [  139.022151]  ? __pfx_ntfs_setxattr+0x10/0x10
      [  139.026569]  ? kvmalloc_node+0x2d/0x120
      [  139.030329]  ? kasan_save_stack+0x41/0x60
      [  139.033883]  ? kasan_save_stack+0x2a/0x60
      [  139.037338]  ? kasan_set_track+0x29/0x40
      [  139.040163]  ? kasan_save_alloc_info+0x1f/0x30
      [  139.043588]  ? __kasan_kmalloc+0x8b/0xa0
      [  139.047255]  ? __kmalloc_node+0x68/0x150
      [  139.051264]  ? kvmalloc_node+0x2d/0x120
      [  139.055301]  ? vmemdup_user+0x2b/0xa0
      [  139.058584]  __vfs_setxattr+0x121/0x170
      [  139.062617]  ? __pfx___vfs_setxattr+0x10/0x10
      [  139.066282]  __vfs_setxattr_noperm+0x97/0x300
      [  139.070061]  __vfs_setxattr_locked+0x145/0x170
      [  139.073580]  vfs_setxattr+0x137/0x2a0
      [  139.076641]  ? __pfx_vfs_setxattr+0x10/0x10
      [  139.080223]  ? __kasan_check_write+0x18/0x20
      [  139.084234]  do_setxattr+0xce/0x150
      [  139.087768]  setxattr+0x126/0x140
      [  139.091250]  ? __pfx_setxattr+0x10/0x10
      [  139.094948]  ? __virt_addr_valid+0xcb/0x140
      [  139.097838]  ? __call_rcu_common.constprop.0+0x1c7/0x330
      [  139.102688]  ? debug_smp_processor_id+0x1b/0x30
      [  139.105985]  ? kasan_quarantine_put+0x5b/0x190
      [  139.109980]  ? putname+0x84/0xa0
      [  139.113886]  ? __kasan_slab_free+0x11e/0x1b0
      [  139.117961]  ? putname+0x84/0xa0
      [  139.121316]  ? preempt_count_sub+0x1c/0xd0
      [  139.124427]  ? __mnt_want_write+0xae/0x100
      [  139.127836]  ? mnt_want_write+0x8f/0x150
      [  139.130954]  path_setxattr+0x164/0x180
      [  139.133998]  ? __pfx_path_setxattr+0x10/0x10
      [  139.137853]  ? __pfx_ksys_pwrite64+0x10/0x10
      [  139.141299]  ? debug_smp_processor_id+0x1b/0x30
      [  139.145714]  ? fpregs_assert_state_consistent+0x6b/0x80
      [  139.150796]  __x64_sys_setxattr+0x71/0x90
      [  139.155407]  do_syscall_64+0x3f/0x90
      [  139.159035]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [  139.163843] RIP: 0033:0x7f108cae4469
      [  139.166481] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 088
      [  139.183764] RSP: 002b:00007fff87588388 EFLAGS: 00000286 ORIG_RAX: 00000000000000bc
      [  139.190657] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f108cae4469
      [  139.196586] RDX: 00007fff875883b0 RSI: 00007fff875883d1 RDI: 00007fff875883b6
      [  139.201716] RBP: 00007fff8758c530 R08: 0000000000000001 R09: 00007fff8758c618
      [  139.207940] R10: 0000000000000006 R11: 0000000000000286 R12: 00000000004004c0
      [  139.214007] R13: 00007fff8758c610 R14: 0000000000000000 R15: 0000000000000000
      
      Signed-off-by: default avatarEdward Lo <loyuantsung@gmail.com>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      c9db0ff0
    • Edward Lo's avatar
      fs/ntfs3: Enhance sanity check while generating attr_list · fdec309c
      Edward Lo authored
      
      
      ni_create_attr_list uses WARN_ON to catch error cases while generating
      attribute list, which only prints out stack trace and may not be enough.
      This repalces them with more proper error handling flow.
      
      [   59.666332] BUG: kernel NULL pointer dereference, address: 000000000000000e
      [   59.673268] #PF: supervisor read access in kernel mode
      [   59.678354] #PF: error_code(0x0000) - not-present page
      [   59.682831] PGD 8000000005ff1067 P4D 8000000005ff1067 PUD 7dee067 PMD 0
      [   59.688556] Oops: 0000 [#1] PREEMPT SMP KASAN PTI
      [   59.692642] CPU: 0 PID: 198 Comm: poc Tainted: G    B   W          6.2.0-rc1+ #4
      [   59.698868] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
      [   59.708795] RIP: 0010:ni_create_attr_list+0x505/0x860
      [   59.713657] Code: 7e 10 e8 5e d0 d0 ff 45 0f b7 76 10 48 8d 7b 16 e8 00 d1 d0 ff 66 44 89 73 16 4d 8d 75 0e 4c 89 f7 e8 3f d0 d0 ff 4c 8d8
      [   59.731559] RSP: 0018:ffff88800a56f1e0 EFLAGS: 00010282
      [   59.735691] RAX: 0000000000000001 RBX: ffff88800b7b5088 RCX: ffffffffb83079fe
      [   59.741792] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbb7f9fc0
      [   59.748423] RBP: ffff88800a56f3a8 R08: ffff88800b7b50a0 R09: fffffbfff76ff3f9
      [   59.754654] R10: ffffffffbb7f9fc7 R11: fffffbfff76ff3f8 R12: ffff88800b756180
      [   59.761552] R13: 0000000000000000 R14: 000000000000000e R15: 0000000000000050
      [   59.768323] FS:  00007feaa8c96440(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000
      [   59.776027] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   59.781395] CR2: 00007f3a2e0b1000 CR3: 000000000a5bc000 CR4: 00000000000006f0
      [   59.787607] Call Trace:
      [   59.790271]  <TASK>
      [   59.792488]  ? __pfx_ni_create_attr_list+0x10/0x10
      [   59.797235]  ? kernel_text_address+0xd3/0xe0
      [   59.800856]  ? unwind_get_return_address+0x3e/0x60
      [   59.805101]  ? __kasan_check_write+0x18/0x20
      [   59.809296]  ? preempt_count_sub+0x1c/0xd0
      [   59.813421]  ni_ins_attr_ext+0x52c/0x5c0
      [   59.817034]  ? __pfx_ni_ins_attr_ext+0x10/0x10
      [   59.821926]  ? __vfs_setxattr+0x121/0x170
      [   59.825718]  ? __vfs_setxattr_noperm+0x97/0x300
      [   59.829562]  ? __vfs_setxattr_locked+0x145/0x170
      [   59.833987]  ? vfs_setxattr+0x137/0x2a0
      [   59.836732]  ? do_setxattr+0xce/0x150
      [   59.839807]  ? setxattr+0x126/0x140
      [   59.842353]  ? path_setxattr+0x164/0x180
      [   59.845275]  ? __x64_sys_setxattr+0x71/0x90
      [   59.848838]  ? do_syscall_64+0x3f/0x90
      [   59.851898]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [   59.857046]  ? stack_depot_save+0x17/0x20
      [   59.860299]  ni_insert_attr+0x1ba/0x420
      [   59.863104]  ? __pfx_ni_insert_attr+0x10/0x10
      [   59.867069]  ? preempt_count_sub+0x1c/0xd0
      [   59.869897]  ? _raw_spin_unlock_irqrestore+0x2b/0x50
      [   59.874088]  ? __create_object+0x3ae/0x5d0
      [   59.877865]  ni_insert_resident+0xc4/0x1c0
      [   59.881430]  ? __pfx_ni_insert_resident+0x10/0x10
      [   59.886355]  ? kasan_save_alloc_info+0x1f/0x30
      [   59.891117]  ? __kasan_kmalloc+0x8b/0xa0
      [   59.894383]  ntfs_set_ea+0x90d/0xbf0
      [   59.897703]  ? __pfx_ntfs_set_ea+0x10/0x10
      [   59.901011]  ? kernel_text_address+0xd3/0xe0
      [   59.905308]  ? __kernel_text_address+0x16/0x50
      [   59.909811]  ? unwind_get_return_address+0x3e/0x60
      [   59.914898]  ? __pfx_stack_trace_consume_entry+0x10/0x10
      [   59.920250]  ? arch_stack_walk+0xa2/0x100
      [   59.924560]  ? filter_irq_stacks+0x27/0x80
      [   59.928722]  ntfs_setxattr+0x405/0x440
      [   59.932512]  ? __pfx_ntfs_setxattr+0x10/0x10
      [   59.936634]  ? kvmalloc_node+0x2d/0x120
      [   59.940378]  ? kasan_save_stack+0x41/0x60
      [   59.943870]  ? kasan_save_stack+0x2a/0x60
      [   59.947719]  ? kasan_set_track+0x29/0x40
      [   59.951417]  ? kasan_save_alloc_info+0x1f/0x30
      [   59.955733]  ? __kasan_kmalloc+0x8b/0xa0
      [   59.959598]  ? __kmalloc_node+0x68/0x150
      [   59.963163]  ? kvmalloc_node+0x2d/0x120
      [   59.966490]  ? vmemdup_user+0x2b/0xa0
      [   59.969060]  __vfs_setxattr+0x121/0x170
      [   59.972456]  ? __pfx___vfs_setxattr+0x10/0x10
      [   59.976008]  __vfs_setxattr_noperm+0x97/0x300
      [   59.981562]  __vfs_setxattr_locked+0x145/0x170
      [   59.986100]  vfs_setxattr+0x137/0x2a0
      [   59.989964]  ? __pfx_vfs_setxattr+0x10/0x10
      [   59.993616]  ? __kasan_check_write+0x18/0x20
      [   59.997425]  do_setxattr+0xce/0x150
      [   60.000304]  setxattr+0x126/0x140
      [   60.002967]  ? __pfx_setxattr+0x10/0x10
      [   60.006471]  ? __virt_addr_valid+0xcb/0x140
      [   60.010461]  ? __call_rcu_common.constprop.0+0x1c7/0x330
      [   60.016037]  ? debug_smp_processor_id+0x1b/0x30
      [   60.021008]  ? kasan_quarantine_put+0x5b/0x190
      [   60.025545]  ? putname+0x84/0xa0
      [   60.027910]  ? __kasan_slab_free+0x11e/0x1b0
      [   60.031483]  ? putname+0x84/0xa0
      [   60.033986]  ? preempt_count_sub+0x1c/0xd0
      [   60.036876]  ? __mnt_want_write+0xae/0x100
      [   60.040738]  ? mnt_want_write+0x8f/0x150
      [   60.044317]  path_setxattr+0x164/0x180
      [   60.048096]  ? __pfx_path_setxattr+0x10/0x10
      [   60.052096]  ? strncpy_from_user+0x175/0x1c0
      [   60.056482]  ? debug_smp_processor_id+0x1b/0x30
      [   60.059848]  ? fpregs_assert_state_consistent+0x6b/0x80
      [   60.064557]  __x64_sys_setxattr+0x71/0x90
      [   60.068892]  do_syscall_64+0x3f/0x90
      [   60.072868]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [   60.077523] RIP: 0033:0x7feaa86e4469
      [   60.080915] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 088
      [   60.097353] RSP: 002b:00007ffdbd8311e8 EFLAGS: 00000286 ORIG_RAX: 00000000000000bc
      [   60.103386] RAX: ffffffffffffffda RBX: 9461c5e290baac00 RCX: 00007feaa86e4469
      [   60.110322] RDX: 00007ffdbd831fe0 RSI: 00007ffdbd831305 RDI: 00007ffdbd831263
      [   60.116808] RBP: 00007ffdbd836180 R08: 0000000000000001 R09: 00007ffdbd836268
      [   60.123879] R10: 000000000000007d R11: 0000000000000286 R12: 0000000000400500
      [   60.130540] R13: 00007ffdbd836260 R14: 0000000000000000 R15: 0000000000000000
      [   60.136553]  </TASK>
      [   60.138818] Modules linked in:
      [   60.141839] CR2: 000000000000000e
      [   60.144831] ---[ end trace 0000000000000000 ]---
      [   60.149058] RIP: 0010:ni_create_attr_list+0x505/0x860
      [   60.153975] Code: 7e 10 e8 5e d0 d0 ff 45 0f b7 76 10 48 8d 7b 16 e8 00 d1 d0 ff 66 44 89 73 16 4d 8d 75 0e 4c 89 f7 e8 3f d0 d0 ff 4c 8d8
      [   60.172443] RSP: 0018:ffff88800a56f1e0 EFLAGS: 00010282
      [   60.176246] RAX: 0000000000000001 RBX: ffff88800b7b5088 RCX: ffffffffb83079fe
      [   60.182752] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbb7f9fc0
      [   60.189949] RBP: ffff88800a56f3a8 R08: ffff88800b7b50a0 R09: fffffbfff76ff3f9
      [   60.196950] R10: ffffffffbb7f9fc7 R11: fffffbfff76ff3f8 R12: ffff88800b756180
      [   60.203671] R13: 0000000000000000 R14: 000000000000000e R15: 0000000000000050
      [   60.209595] FS:  00007feaa8c96440(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000
      [   60.216299] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   60.222276] CR2: 00007f3a2e0b1000 CR3: 000000000a5bc000 CR4: 00000000000006f0
      
      Signed-off-by: default avatarEdward Lo <loyuantsung@gmail.com>
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      fdec309c
    • Yangtao Li's avatar
      fs/ntfs3: Use wrapper i_blocksize() in ntfs_zero_range() · f39244e2
      Yangtao Li authored
      
      
      Convert to use i_blocksize() for readability.
      
      Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
      [almaz.alexandrovich@paragon-software.com:
      the patch has been partially accepted for performance reasons]
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      f39244e2
    • Zeng Heng's avatar
      ntfs: Fix panic about slab-out-of-bounds caused by ntfs_listxattr() · 3c675ddf
      Zeng Heng authored
      Here is a BUG report from syzbot:
      
      BUG: KASAN: slab-out-of-bounds in ntfs_list_ea fs/ntfs3/xattr.c:191 [inline]
      BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x401/0x570 fs/ntfs3/xattr.c:710
      Read of size 1 at addr ffff888021acaf3d by task syz-executor128/3632
      
      Call Trace:
       ntfs_list_ea fs/ntfs3/xattr.c:191 [inline]
       ntfs_listxattr+0x401/0x570 fs/ntfs3/xattr.c:710
       vfs_listxattr fs/xattr.c:457 [inline]
       listxattr+0x293/0x2d0 fs/xattr.c:804
      
      Fix the logic of ea_all iteration. When the ea->name_len is 0,
      return immediately, or Add2Ptr() would visit invalid memory
      in the next loop.
      
      Fixes: be71b5cb
      
       ("fs/ntfs3: Add attrib operations")
      Reported-by: default avatar <syzbot+9fcea5ef6dc4dc72d334@syzkaller.appspotmail.com>
      Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
      [almaz.alexandrovich@paragon-software.com: lines of the patch have changed]
      Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
      3c675ddf
  2. Jun 26, 2023
  3. Jun 24, 2023
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm · a92b7d26
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Very quiet last week, just two misc fixes, one dp-mst and one qaic:
      
        qaic:
         - dma-buf import fix
      
        dp-mst:
         - fix NULL ptr deref"
      
      [ It turns out it was a quiet week because Alex Deucher hadn't sent in
        his pending AMD changes. So they are coming next    - Linus ]
      
      * tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm:
        drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2
        accel/qaic: Call DRM helper function to destroy prime GEM
      a92b7d26
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 0f56e657
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "The final bug fixes for Qualcomm and Rockchips came in, all of them
        for devicetree files:
      
         - Devices on Qualcomm SC7180/SC7280 that are cache coherent are now
           marked so correctly to fix a regression after a change in kernel
           behavior
      
         - Rockchips has a few minor changes for correctness of regulator and
           cache properties, as well as fixes for incorrect behavior of the
           RK3568 PCI controller and reset pins on two boards"
      
      * tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP
        dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent
        arm64: dts: rockchip: Fix rk356x PCIe register and range mappings
        arm64: dts: rockchip: fix button reset pin for nanopi r5c
        arm64: dts: rockchip: fix nEXTRST on SOQuartz
        arm64: dts: rockchip: add missing cache properties
        arm64: dts: rockchip: fix USB regulator on ROCK64
      0f56e657
    • Linus Torvalds's avatar
      Merge tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 569fa939
      Linus Torvalds authored
      Pull btrfs fix from David Sterba:
       "Unfortunately the recent u32 overflow fix was not complete, there was
        one conversion left, assertion not triggered by my tests but caught by
        Qu's fstests case.
      
        The "cleanup for later" has been promoted to a proper fix and wraps
        all uses of the stripe left shift so the diffstat has grown but leaves
        no potentially problematic uses.
      
        We should have done it that way before, sorry"
      
      * tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix remaining u32 overflows when left shifting stripe_nr
      569fa939
    • Linus Torvalds's avatar
      Merge tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux · 9cb38381
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "It's apparently the week of 'fixup something from last week', because
        the same is true for this block pull request.
      
        Fix up a lock grab that needs to be IRQ saving, rather than just IRQ
        disabling, in the block cgroup code"
      
      * tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux:
        block: make sure local irq is disabled when calling __blkcg_rstat_flush
      9cb38381
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 917b3c7c
      Linus Torvalds authored
      Pull iommu fix from Joerg Roedel:
      
       - Fix potential memory leak in AMD IOMMU domain allocation path
      
      * tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix possible memory leak of 'domain'
      917b3c7c
    • Linus Torvalds's avatar
      Merge tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 61dabacd
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Three oneliner fixes: one for a thinko in SOF SoundWire code and two
        HD-audio quirks for ASUS laptops. All device-specific and should be
        safe to apply"
      
      * tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek: Add quirk for ASUS ROG GV601V
        ALSA: hda/realtek: Add quirk for ASUS ROG G634Z
        ASoC: intel: sof_sdw: Fixup typo in device link checking
      61dabacd
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 6edecb99
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix IRQ initialization in gpiochip_irqchip_add_domain()
      
       - add a missing return value check for platform_get_irq() in
         gpio-sifive
      
       - don't free irq_domains which GPIOLIB does not manage
      
      * tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()
        gpio: sifive: add missing check for platform_get_irq
        gpiolib: Fix GPIO chip IRQ initialization restriction
      6edecb99
    • Arnd Bergmann's avatar
      Merge tag 'qcom-arm64-fixes-for-6.4-2' of... · ed8ff046
      Arnd Bergmann authored
      Merge tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes
      
      One last Qualcomm ARM64 DeviceTree fix for v6.4
      
      Changes related to cache management for DMA memory caused WiFi to stop
      work on SC7180 and SC7280 based products, using TF-A. These changes
      marks the relevant device dma-coherent to correct the behavior.
      
      * tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
        arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor
        arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP
        dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent
      
      Link: https://lore.kernel.org/r/20230622203248.106422-1-andersson@kernel.org
      
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      ed8ff046
    • Linus Torvalds's avatar
      workqueue: clean up WORK_* constant types, clarify masking · afa4bb77
      Linus Torvalds authored
      
      
      Dave Airlie reports that gcc-13.1.1 has started complaining about some
      of the workqueue code in 32-bit arm builds:
      
        kernel/workqueue.c: In function ‘get_work_pwq’:
        kernel/workqueue.c:713:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
          713 |                 return (void *)(data & WORK_STRUCT_WQ_DATA_MASK);
              |                        ^
        [ ... a couple of other cases ... ]
      
      and while it's not immediately clear exactly why gcc started complaining
      about it now, I suspect it's some C23-induced enum type handlign fixup in
      gcc-13 is the cause.
      
      Whatever the reason for starting to complain, the code and data types
      are indeed disgusting enough that the complaint is warranted.
      
      The wq code ends up creating various "helper constants" (like that
      WORK_STRUCT_WQ_DATA_MASK) using an enum type, which is all kinds of
      confused.  The mask needs to be 'unsigned long', not some unspecified
      enum type.
      
      To make matters worse, the actual "mask and cast to a pointer" is
      repeated a couple of times, and the cast isn't even always done to the
      right pointer, but - as the error case above - to a 'void *' with then
      the compiler finishing the job.
      
      That's now how we roll in the kernel.
      
      So create the masks using the proper types rather than some ambiguous
      enumeration, and use a nice helper that actually does the type
      conversion in one well-defined place.
      
      Incidentally, this magically makes clang generate better code.  That,
      admittedly, is really just a sign of clang having been seriously
      confused before, and cleaning up the typing unconfuses the compiler too.
      
      Reported-by: default avatarDave Airlie <airlied@gmail.com>
      Link: https://lore.kernel.org/lkml/CAPM=9twNnV4zMCvrPkw3H-ajZOH-01JVh_kDrxdPYQErz8ZTdA@mail.gmail.com/
      
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      afa4bb77
  4. Jun 23, 2023