mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 52 participants
  • 18285 discussions
[openeuler:openEuler-1.0-LTS 1497/1497] kernel/sched/.tmp_debug.o: warning: objtool: missing symbol for section .text.unlikely
by kernel test robot 17 Mar '25

17 Mar '25
Hi Qiang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: a91497a471caf8cc4af64a68492be62ec9568f7e commit: acfa0f545c7dd43f959c28e8ab4b139c927ba387 [1497/1497] svm: reduce log of run queue and atomic->atomic64 config: x86_64-buildonly-randconfig-005-20250317 (https://download.01.org/0day-ci/archive/20250317/202503171950.PEaY4TuS-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250317/202503171950.PEaY4TuS-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503171950.PEaY4TuS-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/debug.c:797:6: warning: no previous prototype for 'sysrq_sched_debug_tidy' [-Wmissing-prototypes] 797 | void sysrq_sched_debug_tidy(void) | ^~~~~~~~~~~~~~~~~~~~~~ >> kernel/sched/.tmp_debug.o: warning: objtool: missing symbol for section .text.unlikely -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] ext4: fix race condition between ext4_write and ext4_convert_inline_data
by Zizhi Wo 17 Mar '25

17 Mar '25
From: Baokun Li <libaokun1(a)huawei.com> stable inclusion from stable-v5.4.207 commit 18881d7e517169193d9ef6c89c7f322e3e164277 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP2JS CVE: CVE-2022-49414 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit f87c7a4b084afc13190cbb263538e444cb2b392a upstream. Hulk Robot reported a BUG_ON: ================================================================== EXT4-fs error (device loop3): ext4_mb_generate_buddy:805: group 0, block bitmap and bg descriptor inconsistent: 25 vs 31513 free clusters kernel BUG at fs/ext4/ext4_jbd2.c:53! invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 25371 Comm: syz-executor.3 Not tainted 5.10.0+ #1 RIP: 0010:ext4_put_nojournal fs/ext4/ext4_jbd2.c:53 [inline] RIP: 0010:__ext4_journal_stop+0x10e/0x110 fs/ext4/ext4_jbd2.c:116 [...] Call Trace: ext4_write_inline_data_end+0x59a/0x730 fs/ext4/inline.c:795 generic_perform_write+0x279/0x3c0 mm/filemap.c:3344 ext4_buffered_write_iter+0x2e3/0x3d0 fs/ext4/file.c:270 ext4_file_write_iter+0x30a/0x11c0 fs/ext4/file.c:520 do_iter_readv_writev+0x339/0x3c0 fs/read_write.c:732 do_iter_write+0x107/0x430 fs/read_write.c:861 vfs_writev fs/read_write.c:934 [inline] do_pwritev+0x1e5/0x380 fs/read_write.c:1031 [...] ================================================================== Above issue may happen as follows: cpu1 cpu2 __________________________|__________________________ do_pwritev vfs_writev do_iter_write ext4_file_write_iter ext4_buffered_write_iter generic_perform_write ext4_da_write_begin vfs_fallocate ext4_fallocate ext4_convert_inline_data ext4_convert_inline_data_nolock ext4_destroy_inline_data_nolock clear EXT4_STATE_MAY_INLINE_DATA ext4_map_blocks ext4_ext_map_blocks ext4_mb_new_blocks ext4_mb_regular_allocator ext4_mb_good_group_nolock ext4_mb_init_group ext4_mb_init_cache ext4_mb_generate_buddy --> error ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) ext4_restore_inline_data set EXT4_STATE_MAY_INLINE_DATA ext4_block_write_begin ext4_da_write_end ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) ext4_write_inline_data_end handle=NULL ext4_journal_stop(handle) __ext4_journal_stop ext4_put_nojournal(handle) ref_cnt = (unsigned long)handle BUG_ON(ref_cnt == 0) ---> BUG_ON The lock held by ext4_convert_inline_data is xattr_sem, but the lock held by generic_perform_write is i_rwsem. Therefore, the two locks can be concurrent. To solve above issue, we add inode_lock() for ext4_convert_inline_data(). At the same time, move ext4_convert_inline_data() in front of ext4_punch_hole(), remove similar handling from ext4_punch_hole(). Fixes: 0c8d414f163f ("ext4: let fallocate handle inline data correctly") Cc: stable(a)vger.kernel.org Reported-by: Hulk Robot <hulkci(a)huawei.com> Signed-off-by: Baokun Li <libaokun1(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Link: https://lore.kernel.org/r/20220428134031.4153381-1-libaokun1@huawei.com Signed-off-by: Theodore Ts'o <tytso(a)mit.edu> Signed-off-by: Tadeusz Struk <tadeusz.struk(a)linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Zizhi Wo <wozizhi(a)huawei.com> --- fs/ext4/extents.c | 8 +++++--- fs/ext4/inode.c | 9 --------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index a317a74bf617..9b1156cd68d8 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5083,13 +5083,15 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) FALLOC_FL_INSERT_RANGE)) return -EOPNOTSUPP; - if (mode & FALLOC_FL_PUNCH_HOLE) - return ext4_punch_hole(inode, offset, len); - + inode_lock(inode); ret = ext4_convert_inline_data(inode); + inode_unlock(inode); if (ret) return ret; + if (mode & FALLOC_FL_PUNCH_HOLE) + return ext4_punch_hole(inode, offset, len); + if (mode & FALLOC_FL_COLLAPSE_RANGE) return ext4_collapse_range(inode, offset, len); diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 6578d33b62d6..61c07bbeba03 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4294,15 +4294,6 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) trace_ext4_punch_hole(inode, offset, length, 0); - ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); - if (ext4_has_inline_data(inode)) { - down_write(&EXT4_I(inode)->i_mmap_sem); - ret = ext4_convert_inline_data(inode); - up_write(&EXT4_I(inode)->i_mmap_sem); - if (ret) - return ret; - } - /* * Write out all dirty pages to avoid race conditions * Then release them. -- 2.46.1
2 1
0 0
[openeuler:OLK-5.10 2815/2815] ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined
by kernel test robot 17 Mar '25

17 Mar '25
Hi Sean, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: a348aa0315d2a90cde93df922b84ab682459a834 commit: 5476cb89ef2297bd36f8b38e27b54617b6f63236 [2815/2815] x86/vdso: Implement a vDSO for Intel SGX enclave call config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250317/202503171920.f4jVchcy-lkp@…) compiler: clang version 20.1.0 (https://github.com/llvm/llvm-project 24a30daaa559829ad079f2ff7f73eb4e18095f88) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250317/202503171920.f4jVchcy-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503171920.f4jVchcy-lkp@intel.com/ All errors (new ones prefixed by >>): >> ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined >> llvm-objdump: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory -- >> llvm-objcopy: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction
by Liu Chuang 17 Mar '25

17 Mar '25
From: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> stable inclusion from stable-v4.19.238 commit 60e5d391805d70458a01998de00d0c28cba40bf3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6H5 CVE: CVE-2022-49248 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… ---------------------- [ Upstream commit bf0cd60b7e33cf221fbe1114e4acb2c828b0af0d ] AV/C deferred transaction was supported at a commit 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") while 'deferrable' flag can be uninitialized for non-control/notify AV/C transactions. UBSAN reports it: kernel: ================================================================================ kernel: UBSAN: invalid-load in /build/linux-aa0B4d/linux-5.15.0/sound/firewire/fcp.c:363:9 kernel: load of value 158 is not a valid value for type '_Bool' kernel: CPU: 3 PID: 182227 Comm: irq/35-firewire Tainted: P OE 5.15.0-18-generic #18-Ubuntu kernel: Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming 5/AX370-Gaming 5, BIOS F42b 08/01/2019 kernel: Call Trace: kernel: <IRQ> kernel: show_stack+0x52/0x58 kernel: dump_stack_lvl+0x4a/0x5f kernel: dump_stack+0x10/0x12 kernel: ubsan_epilogue+0x9/0x45 kernel: __ubsan_handle_load_invalid_value.cold+0x44/0x49 kernel: fcp_response.part.0.cold+0x1a/0x2b [snd_firewire_lib] kernel: fcp_response+0x28/0x30 [snd_firewire_lib] kernel: fw_core_handle_request+0x230/0x3d0 [firewire_core] kernel: handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? transmit_complete_callback+0x9f/0x120 [firewire_core] kernel: ar_context_tasklet+0xa8/0x2e0 [firewire_ohci] kernel: tasklet_action_common.constprop.0+0xea/0xf0 kernel: tasklet_action+0x22/0x30 kernel: __do_softirq+0xd9/0x2e3 kernel: ? irq_finalize_oneshot.part.0+0xf0/0xf0 kernel: do_softirq+0x75/0xa0 kernel: </IRQ> kernel: <TASK> kernel: __local_bh_enable_ip+0x50/0x60 kernel: irq_forced_thread_fn+0x7e/0x90 kernel: irq_thread+0xba/0x190 kernel: ? irq_thread_fn+0x60/0x60 kernel: kthread+0x11e/0x140 kernel: ? irq_thread_check_affinity+0xf0/0xf0 kernel: ? set_kthread_struct+0x50/0x50 kernel: ret_from_fork+0x22/0x30 kernel: </TASK> kernel: ================================================================================ This commit fixes the bug. The bug has no disadvantage for the non- control/notify AV/C transactions since the flag has an effect for AV/C response with INTERIM (0x0f) status which is not used for the transactions in AV/C general specification. Fixes: 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> Link: https://lore.kernel.org/r/20220304125647.78430-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai(a)suse.de> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Liu Chuang <liuchuang40(a)huawei.com> --- sound/firewire/fcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/firewire/fcp.c b/sound/firewire/fcp.c index 61dda828f767..c8fbb54269cb 100644 --- a/sound/firewire/fcp.c +++ b/sound/firewire/fcp.c @@ -240,9 +240,7 @@ int fcp_avc_transaction(struct fw_unit *unit, t.response_match_bytes = response_match_bytes; t.state = STATE_PENDING; init_waitqueue_head(&t.wait); - - if (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03) - t.deferrable = true; + t.deferrable = (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03); spin_lock_irq(&transactions_lock); list_add_tail(&t.list, &transactions); -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction
by Liu Chuang 17 Mar '25

17 Mar '25
From: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> stable inclusion from stable-v4.19.238 commit 60e5d391805d70458a01998de00d0c28cba40bf3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6H5 CVE: CVE-2022-49248 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… ---------------------- [ Upstream commit bf0cd60b7e33cf221fbe1114e4acb2c828b0af0d ] AV/C deferred transaction was supported at a commit 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") while 'deferrable' flag can be uninitialized for non-control/notify AV/C transactions. UBSAN reports it: kernel: ================================================================================ kernel: UBSAN: invalid-load in /build/linux-aa0B4d/linux-5.15.0/sound/firewire/fcp.c:363:9 kernel: load of value 158 is not a valid value for type '_Bool' kernel: CPU: 3 PID: 182227 Comm: irq/35-firewire Tainted: P OE 5.15.0-18-generic #18-Ubuntu kernel: Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming 5/AX370-Gaming 5, BIOS F42b 08/01/2019 kernel: Call Trace: kernel: <IRQ> kernel: show_stack+0x52/0x58 kernel: dump_stack_lvl+0x4a/0x5f kernel: dump_stack+0x10/0x12 kernel: ubsan_epilogue+0x9/0x45 kernel: __ubsan_handle_load_invalid_value.cold+0x44/0x49 kernel: fcp_response.part.0.cold+0x1a/0x2b [snd_firewire_lib] kernel: fcp_response+0x28/0x30 [snd_firewire_lib] kernel: fw_core_handle_request+0x230/0x3d0 [firewire_core] kernel: handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? transmit_complete_callback+0x9f/0x120 [firewire_core] kernel: ar_context_tasklet+0xa8/0x2e0 [firewire_ohci] kernel: tasklet_action_common.constprop.0+0xea/0xf0 kernel: tasklet_action+0x22/0x30 kernel: __do_softirq+0xd9/0x2e3 kernel: ? irq_finalize_oneshot.part.0+0xf0/0xf0 kernel: do_softirq+0x75/0xa0 kernel: </IRQ> kernel: <TASK> kernel: __local_bh_enable_ip+0x50/0x60 kernel: irq_forced_thread_fn+0x7e/0x90 kernel: irq_thread+0xba/0x190 kernel: ? irq_thread_fn+0x60/0x60 kernel: kthread+0x11e/0x140 kernel: ? irq_thread_check_affinity+0xf0/0xf0 kernel: ? set_kthread_struct+0x50/0x50 kernel: ret_from_fork+0x22/0x30 kernel: </TASK> kernel: ================================================================================ This commit fixes the bug. The bug has no disadvantage for the non- control/notify AV/C transactions since the flag has an effect for AV/C response with INTERIM (0x0f) status which is not used for the transactions in AV/C general specification. Fixes: 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> Link: https://lore.kernel.org/r/20220304125647.78430-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai(a)suse.de> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Liu Chuang <liuchuang40(a)huawei.com> --- sound/firewire/fcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/firewire/fcp.c b/sound/firewire/fcp.c index 61dda828f767..c8fbb54269cb 100644 --- a/sound/firewire/fcp.c +++ b/sound/firewire/fcp.c @@ -240,9 +240,7 @@ int fcp_avc_transaction(struct fw_unit *unit, t.response_match_bytes = response_match_bytes; t.state = STATE_PENDING; init_waitqueue_head(&t.wait); - - if (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03) - t.deferrable = true; + t.deferrable = (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03); spin_lock_irq(&transactions_lock); list_add_tail(&t.list, &transactions); -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction
by Liu Chuang 17 Mar '25

17 Mar '25
From: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> stable inclusion from stable-v4.19.238 commit 60e5d391805d70458a01998de00d0c28cba40bf3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6H5 CVE: CVE-2022-49248 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… ---------------------- [ Upstream commit bf0cd60b7e33cf221fbe1114e4acb2c828b0af0d ] AV/C deferred transaction was supported at a commit 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") while 'deferrable' flag can be uninitialized for non-control/notify AV/C transactions. UBSAN reports it: kernel: ================================================================================ kernel: UBSAN: invalid-load in /build/linux-aa0B4d/linux-5.15.0/sound/firewire/fcp.c:363:9 kernel: load of value 158 is not a valid value for type '_Bool' kernel: CPU: 3 PID: 182227 Comm: irq/35-firewire Tainted: P OE 5.15.0-18-generic #18-Ubuntu kernel: Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming 5/AX370-Gaming 5, BIOS F42b 08/01/2019 kernel: Call Trace: kernel: <IRQ> kernel: show_stack+0x52/0x58 kernel: dump_stack_lvl+0x4a/0x5f kernel: dump_stack+0x10/0x12 kernel: ubsan_epilogue+0x9/0x45 kernel: __ubsan_handle_load_invalid_value.cold+0x44/0x49 kernel: fcp_response.part.0.cold+0x1a/0x2b [snd_firewire_lib] kernel: fcp_response+0x28/0x30 [snd_firewire_lib] kernel: fw_core_handle_request+0x230/0x3d0 [firewire_core] kernel: handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? handle_ar_packet+0x1d9/0x200 [firewire_ohci] kernel: ? transmit_complete_callback+0x9f/0x120 [firewire_core] kernel: ar_context_tasklet+0xa8/0x2e0 [firewire_ohci] kernel: tasklet_action_common.constprop.0+0xea/0xf0 kernel: tasklet_action+0x22/0x30 kernel: __do_softirq+0xd9/0x2e3 kernel: ? irq_finalize_oneshot.part.0+0xf0/0xf0 kernel: do_softirq+0x75/0xa0 kernel: </IRQ> kernel: <TASK> kernel: __local_bh_enable_ip+0x50/0x60 kernel: irq_forced_thread_fn+0x7e/0x90 kernel: irq_thread+0xba/0x190 kernel: ? irq_thread_fn+0x60/0x60 kernel: kthread+0x11e/0x140 kernel: ? irq_thread_check_affinity+0xf0/0xf0 kernel: ? set_kthread_struct+0x50/0x50 kernel: ret_from_fork+0x22/0x30 kernel: </TASK> kernel: ================================================================================ This commit fixes the bug. The bug has no disadvantage for the non- control/notify AV/C transactions since the flag has an effect for AV/C response with INTERIM (0x0f) status which is not used for the transactions in AV/C general specification. Fixes: 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction") Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> Link: https://lore.kernel.org/r/20220304125647.78430-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai(a)suse.de> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Liu Chuang <liuchuang40(a)huawei.com> --- sound/firewire/fcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/firewire/fcp.c b/sound/firewire/fcp.c index 61dda828f767..c8fbb54269cb 100644 --- a/sound/firewire/fcp.c +++ b/sound/firewire/fcp.c @@ -240,9 +240,7 @@ int fcp_avc_transaction(struct fw_unit *unit, t.response_match_bytes = response_match_bytes; t.state = STATE_PENDING; init_waitqueue_head(&t.wait); - - if (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03) - t.deferrable = true; + t.deferrable = (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03); spin_lock_irq(&transactions_lock); list_add_tail(&t.list, &transactions); -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] media: uvcvideo: Fix crash during unbind if gpio unit is in use
by Zhang Kunbo 17 Mar '25

17 Mar '25
From: Ricardo Ribalda <ribalda(a)chromium.org> stable inclusion from stable-v6.6.78 commit 0b5e0445bc8384c18bd35cb9fe87f6258c6271d9 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBRED4 CVE: CVE-2024-58079 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5 upstream. We used the wrong device for the device managed functions. We used the usb device, when we should be using the interface device. If we unbind the driver from the usb interface, the cleanup functions are never called. In our case, the IRQ is never disabled. If an IRQ is triggered, it will try to access memory sections that are already free, causing an OOPS. We cannot use the function devm_request_threaded_irq here. The devm_* clean functions may be called after the main structure is released by uvc_delete. Luckily this bug has small impact, as it is only affected by devices with gpio units and the user has to unbind the device, a disconnect will not trigger this error. Cc: stable(a)vger.kernel.org Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") Reviewed-by: Sergey Senozhatsky <senozhatsky(a)chromium.org> Signed-off-by: Ricardo Ribalda <ribalda(a)chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com> Link: https://lore.kernel.org/r/20241106-uvc-crashrmmod-v6-1-fbf9781c6e83@chromiu… Signed-off-by: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Conflicts: drivers/media/usb/uvc/uvc_driver.c [ context conflicts. 0a56f698623f has not been merged. ] Signed-off-by: Zhang Kunbo <zhangkunbo(a)huawei.com> --- drivers/media/usb/uvc/uvc_driver.c | 28 +++++++++++++++++++++------- drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 1b05890f99f4..8467f6329fd6 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1295,14 +1295,14 @@ static int uvc_gpio_parse(struct uvc_device *dev) struct gpio_desc *gpio_privacy; int irq; - gpio_privacy = devm_gpiod_get_optional(&dev->udev->dev, "privacy", + gpio_privacy = devm_gpiod_get_optional(&dev->intf->dev, "privacy", GPIOD_IN); if (IS_ERR_OR_NULL(gpio_privacy)) return PTR_ERR_OR_ZERO(gpio_privacy); irq = gpiod_to_irq(gpio_privacy); if (irq < 0) - return dev_err_probe(&dev->udev->dev, irq, + return dev_err_probe(&dev->intf->dev, irq, "No IRQ for privacy GPIO\n"); unit = uvc_alloc_new_entity(dev, UVC_EXT_GPIO_UNIT, @@ -1329,15 +1329,27 @@ static int uvc_gpio_parse(struct uvc_device *dev) static int uvc_gpio_init_irq(struct uvc_device *dev) { struct uvc_entity *unit = dev->gpio_unit; + int ret; if (!unit || unit->gpio.irq < 0) return 0; - return devm_request_threaded_irq(&dev->udev->dev, unit->gpio.irq, NULL, - uvc_gpio_irq, - IRQF_ONESHOT | IRQF_TRIGGER_FALLING | - IRQF_TRIGGER_RISING, - "uvc_privacy_gpio", dev); + ret = request_threaded_irq(unit->gpio.irq, NULL, uvc_gpio_irq, + IRQF_ONESHOT | IRQF_TRIGGER_FALLING | + IRQF_TRIGGER_RISING, + "uvc_privacy_gpio", dev); + + unit->gpio.initialized = !ret; + + return ret; +} + +static void uvc_gpio_deinit(struct uvc_device *dev) +{ + if (!dev->gpio_unit || !dev->gpio_unit->gpio.initialized) + return; + + free_irq(dev->gpio_unit->gpio.irq, dev); } /* ------------------------------------------------------------------------ @@ -1934,6 +1946,8 @@ static void uvc_unregister_video(struct uvc_device *dev) { struct uvc_streaming *stream; + uvc_gpio_deinit(dev); + list_for_each_entry(stream, &dev->streams, list) { /* Nothing to do here, continue. */ if (!video_is_registered(&stream->vdev)) diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index e5b12717016f..997f4b5b5e22 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -229,6 +229,7 @@ struct uvc_entity { u8 *bmControls; struct gpio_desc *gpio_privacy; int irq; + bool initialized; } gpio; }; -- 2.34.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 1495/1495] drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: sparse: sparse: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static?
by kernel test robot 16 Mar '25

16 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d734d6bbda17b68dd3979a9f707564a18cf04761 commit: 78ebe0ea5251a234cfc5ed00b0d196c74ee7b2e4 [1495/1495] net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices config: x86_64-randconfig-123-20250316 (https://download.01.org/0day-ci/archive/20250316/202503162347.VAauKjgX-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250316/202503162347.VAauKjgX-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503162347.VAauKjgX-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: sparse: sparse: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: warning: no previous prototype for 'mlx5i_grp_sw_update_stats' [-Wmissing-prototypes] 119 | void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv) | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:35: drivers/net/ethernet/mellanox/mlx5/core/en.h:208:19: warning: 'mlx5e_priv_flags' defined but not used [-Wunused-const-variable=] 208 | static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = { | ^~~~~~~~~~~~~~~~ vim +/mlx5i_grp_sw_update_stats +119 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c 118 > 119 void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv) 120 { 121 struct mlx5e_sw_stats s = { 0 }; 122 int i, j; 123 124 for (i = 0; i < priv->profile->max_nch(priv->mdev); i++) { 125 struct mlx5e_channel_stats *channel_stats; 126 struct mlx5e_rq_stats *rq_stats; 127 128 channel_stats = &priv->channel_stats[i]; 129 rq_stats = &channel_stats->rq; 130 131 s.rx_packets += rq_stats->packets; 132 s.rx_bytes += rq_stats->bytes; 133 134 for (j = 0; j < priv->max_opened_tc; j++) { 135 struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j]; 136 137 s.tx_packets += sq_stats->packets; 138 s.tx_bytes += sq_stats->bytes; 139 s.tx_queue_dropped += sq_stats->dropped; 140 } 141 } 142 143 memcpy(&priv->stats.sw, &s, sizeof(s)); 144 } 145 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1495/1495] drivers/infiniband/hw/mlx5/devx.c:1111:1: sparse: sparse: symbol 'mlx5_ib_object_MLX5_IB_OBJECT_DEVX_UMEM' was not declared. Should it be static?
by kernel test robot 16 Mar '25

16 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d734d6bbda17b68dd3979a9f707564a18cf04761 commit: a18da41fb250cfa4191a98958bcd39df2111206f [1495/1495] RDMA/uverbs: Fix typo in string concatenation macro config: x86_64-randconfig-123-20250316 (https://download.01.org/0day-ci/archive/20250316/202503162045.rwTdUh4F-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250316/202503162045.rwTdUh4F-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503162045.rwTdUh4F-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/infiniband/hw/mlx5/devx.c:1099:1: sparse: sparse: symbol 'mlx5_ib_object_MLX5_IB_OBJECT_DEVX' was not declared. Should it be static? drivers/infiniband/hw/mlx5/devx.c:1104:1: sparse: sparse: symbol 'mlx5_ib_object_MLX5_IB_OBJECT_DEVX_OBJ' was not declared. Should it be static? >> drivers/infiniband/hw/mlx5/devx.c:1111:1: sparse: sparse: symbol 'mlx5_ib_object_MLX5_IB_OBJECT_DEVX_UMEM' was not declared. Should it be static? -- >> drivers/infiniband/hw/mlx5/flow.c:236:1: sparse: sparse: symbol 'mlx5_ib_object_MLX5_IB_OBJECT_FLOW_MATCHER' was not declared. Should it be static? vim +/mlx5_ib_object_MLX5_IB_OBJECT_DEVX_UMEM +1111 drivers/infiniband/hw/mlx5/devx.c aeae94579caf774 Yishai Hadas 2018-06-17 988 9a119cd597769e0 Jason Gunthorpe 2018-07-04 989 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 990 MLX5_IB_METHOD_DEVX_UMEM_REG, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 991 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE, aeae94579caf774 Yishai Hadas 2018-06-17 992 MLX5_IB_OBJECT_DEVX_UMEM, aeae94579caf774 Yishai Hadas 2018-06-17 993 UVERBS_ACCESS_NEW, 83bb4442330f035 Jason Gunthorpe 2018-07-04 994 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 995 UVERBS_ATTR_PTR_IN(MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 996 UVERBS_ATTR_TYPE(u64), 83bb4442330f035 Jason Gunthorpe 2018-07-04 997 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 998 UVERBS_ATTR_PTR_IN(MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 999 UVERBS_ATTR_TYPE(u64), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1000 UA_MANDATORY), bccd06223f21654 Jason Gunthorpe 2018-07-26 1001 UVERBS_ATTR_FLAGS_IN(MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, bccd06223f21654 Jason Gunthorpe 2018-07-26 1002 enum ib_access_flags), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1003 UVERBS_ATTR_PTR_OUT(MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1004 UVERBS_ATTR_TYPE(u32), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1005 UA_MANDATORY)); aeae94579caf774 Yishai Hadas 2018-06-17 1006 528922afd41cdd1 Yishai Hadas 2018-07-08 1007 DECLARE_UVERBS_NAMED_METHOD_DESTROY( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1008 MLX5_IB_METHOD_DEVX_UMEM_DEREG, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1009 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE, aeae94579caf774 Yishai Hadas 2018-06-17 1010 MLX5_IB_OBJECT_DEVX_UMEM, aeae94579caf774 Yishai Hadas 2018-06-17 1011 UVERBS_ACCESS_DESTROY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1012 UA_MANDATORY)); aeae94579caf774 Yishai Hadas 2018-06-17 1013 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1014 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1015 MLX5_IB_METHOD_DEVX_QUERY_EQN, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1016 UVERBS_ATTR_PTR_IN(MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1017 UVERBS_ATTR_TYPE(u32), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1018 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1019 UVERBS_ATTR_PTR_OUT(MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1020 UVERBS_ATTR_TYPE(u32), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1021 UA_MANDATORY)); f6fe01b7181be17 Yishai Hadas 2018-06-17 1022 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1023 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1024 MLX5_IB_METHOD_DEVX_QUERY_UAR, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1025 UVERBS_ATTR_PTR_IN(MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1026 UVERBS_ATTR_TYPE(u32), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1027 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1028 UVERBS_ATTR_PTR_OUT(MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1029 UVERBS_ATTR_TYPE(u32), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1030 UA_MANDATORY)); 7c043e908a74ae0 Yishai Hadas 2018-06-17 1031 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1032 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1033 MLX5_IB_METHOD_DEVX_OTHER, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1034 UVERBS_ATTR_PTR_IN( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1035 MLX5_IB_ATTR_DEVX_OTHER_CMD_IN, 8aa8c95ce4ccc10 Yishai Hadas 2018-06-17 1036 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_in_cmd_hdr)), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1037 UA_MANDATORY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1038 UA_ALLOC_AND_COPY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1039 UVERBS_ATTR_PTR_OUT( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1040 MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, 8aa8c95ce4ccc10 Yishai Hadas 2018-06-17 1041 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_out_cmd_hdr)), 540cd69209682a3 Jason Gunthorpe 2018-07-04 1042 UA_MANDATORY)); 8aa8c95ce4ccc10 Yishai Hadas 2018-06-17 1043 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1044 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1045 MLX5_IB_METHOD_DEVX_OBJ_CREATE, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1046 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE, 7efce3691d33e1f Yishai Hadas 2018-06-17 1047 MLX5_IB_OBJECT_DEVX_OBJ, 7efce3691d33e1f Yishai Hadas 2018-06-17 1048 UVERBS_ACCESS_NEW, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1049 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1050 UVERBS_ATTR_PTR_IN( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1051 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, 7efce3691d33e1f Yishai Hadas 2018-06-17 1052 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_in_cmd_hdr)), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1053 UA_MANDATORY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1054 UA_ALLOC_AND_COPY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1055 UVERBS_ATTR_PTR_OUT( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1056 MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, 7efce3691d33e1f Yishai Hadas 2018-06-17 1057 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_out_cmd_hdr)), 540cd69209682a3 Jason Gunthorpe 2018-07-04 1058 UA_MANDATORY)); 7efce3691d33e1f Yishai Hadas 2018-06-17 1059 528922afd41cdd1 Yishai Hadas 2018-07-08 1060 DECLARE_UVERBS_NAMED_METHOD_DESTROY( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1061 MLX5_IB_METHOD_DEVX_OBJ_DESTROY, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1062 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE, 7efce3691d33e1f Yishai Hadas 2018-06-17 1063 MLX5_IB_OBJECT_DEVX_OBJ, 7efce3691d33e1f Yishai Hadas 2018-06-17 1064 UVERBS_ACCESS_DESTROY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1065 UA_MANDATORY)); 7efce3691d33e1f Yishai Hadas 2018-06-17 1066 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1067 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1068 MLX5_IB_METHOD_DEVX_OBJ_MODIFY, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1069 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE, e662e14d801b01a Yishai Hadas 2018-06-17 1070 MLX5_IB_OBJECT_DEVX_OBJ, e662e14d801b01a Yishai Hadas 2018-06-17 1071 UVERBS_ACCESS_WRITE, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1072 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1073 UVERBS_ATTR_PTR_IN( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1074 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, e662e14d801b01a Yishai Hadas 2018-06-17 1075 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_in_cmd_hdr)), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1076 UA_MANDATORY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1077 UA_ALLOC_AND_COPY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1078 UVERBS_ATTR_PTR_OUT( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1079 MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, e662e14d801b01a Yishai Hadas 2018-06-17 1080 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_out_cmd_hdr)), 540cd69209682a3 Jason Gunthorpe 2018-07-04 1081 UA_MANDATORY)); e662e14d801b01a Yishai Hadas 2018-06-17 1082 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1083 DECLARE_UVERBS_NAMED_METHOD( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1084 MLX5_IB_METHOD_DEVX_OBJ_QUERY, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1085 UVERBS_ATTR_IDR(MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE, e662e14d801b01a Yishai Hadas 2018-06-17 1086 MLX5_IB_OBJECT_DEVX_OBJ, e662e14d801b01a Yishai Hadas 2018-06-17 1087 UVERBS_ACCESS_READ, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1088 UA_MANDATORY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1089 UVERBS_ATTR_PTR_IN( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1090 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, e662e14d801b01a Yishai Hadas 2018-06-17 1091 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_in_cmd_hdr)), 83bb4442330f035 Jason Gunthorpe 2018-07-04 1092 UA_MANDATORY, 83bb4442330f035 Jason Gunthorpe 2018-07-04 1093 UA_ALLOC_AND_COPY), 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1094 UVERBS_ATTR_PTR_OUT( 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1095 MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, e662e14d801b01a Yishai Hadas 2018-06-17 1096 UVERBS_ATTR_MIN_SIZE(MLX5_ST_SZ_BYTES(general_obj_out_cmd_hdr)), 540cd69209682a3 Jason Gunthorpe 2018-07-04 1097 UA_MANDATORY)); e662e14d801b01a Yishai Hadas 2018-06-17 1098 6c61d2a55c4e598 Jason Gunthorpe 2018-07-04 1099 DECLARE_UVERBS_GLOBAL_METHODS(MLX5_IB_OBJECT_DEVX, 7c043e908a74ae0 Yishai Hadas 2018-06-17 1100 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_OTHER), f6fe01b7181be17 Yishai Hadas 2018-06-17 1101 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_QUERY_UAR), f6fe01b7181be17 Yishai Hadas 2018-06-17 1102 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_QUERY_EQN)); 8aa8c95ce4ccc10 Yishai Hadas 2018-06-17 1103 6c61d2a55c4e598 Jason Gunthorpe 2018-07-04 1104 DECLARE_UVERBS_NAMED_OBJECT(MLX5_IB_OBJECT_DEVX_OBJ, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1105 UVERBS_TYPE_ALLOC_IDR(devx_obj_cleanup), 7efce3691d33e1f Yishai Hadas 2018-06-17 1106 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_OBJ_CREATE), e662e14d801b01a Yishai Hadas 2018-06-17 1107 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_OBJ_DESTROY), e662e14d801b01a Yishai Hadas 2018-06-17 1108 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_OBJ_MODIFY), e662e14d801b01a Yishai Hadas 2018-06-17 1109 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_OBJ_QUERY)); 7efce3691d33e1f Yishai Hadas 2018-06-17 1110 6c61d2a55c4e598 Jason Gunthorpe 2018-07-04 @1111 DECLARE_UVERBS_NAMED_OBJECT(MLX5_IB_OBJECT_DEVX_UMEM, 9a119cd597769e0 Jason Gunthorpe 2018-07-04 1112 UVERBS_TYPE_ALLOC_IDR(devx_umem_cleanup), aeae94579caf774 Yishai Hadas 2018-06-17 1113 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_UMEM_REG), aeae94579caf774 Yishai Hadas 2018-06-17 1114 &UVERBS_METHOD(MLX5_IB_METHOD_DEVX_UMEM_DEREG)); aeae94579caf774 Yishai Hadas 2018-06-17 1115 :::::: The code at line 1111 was first introduced by commit :::::: 6c61d2a55c4e5980e231fac9bb54e6ff1a5e811b RDMA/uverbs: Simplify UVERBS_OBJECT and _TREE family of macros :::::: TO: Jason Gunthorpe <jgg(a)mellanox.com> :::::: CC: Jason Gunthorpe <jgg(a)mellanox.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] cpufreq: pmac32-cpufreq: Fix refcount leak bug
by Zhang Kunbo 16 Mar '25

16 Mar '25
From: Liang He <windhl(a)126.com> stable inclusion from stable-v4.19.253 commit 4585890ab2dbf455d80e254d3d859d4c1e357920 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6TT CVE: CVE-2022-49621 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit ccd7567d4b6cf187fdfa55f003a9e461ee629e36 ] In pmac_cpufreq_init_MacRISC3(), we need to add corresponding of_node_put() for the three node pointers whose refcount have been incremented by of_find_node_by_name(). Signed-off-by: Liang He <windhl(a)126.com> Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zhang Kunbo <zhangkunbo(a)huawei.com> --- drivers/cpufreq/pmac32-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c index e225edb5c359..ce0dda1a4241 100644 --- a/drivers/cpufreq/pmac32-cpufreq.c +++ b/drivers/cpufreq/pmac32-cpufreq.c @@ -474,6 +474,10 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) if (slew_done_gpio_np) slew_done_gpio = read_gpio(slew_done_gpio_np); + of_node_put(volt_gpio_np); + of_node_put(freq_gpio_np); + of_node_put(slew_done_gpio_np); + /* If we use the frequency GPIOs, calculate the min/max speeds based * on the bus frequencies */ -- 2.34.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty