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
  • ----- 2026 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • 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

  • 47 participants
  • 23614 discussions
[PATCH OLK-6.6] tracing/probe: reject non-closed empty immediate strings
by Tengda Wu 25 May '26

25 May '26
From: Pengpeng Hou <pengpeng(a)iscas.ac.cn> stable inclusion from stable-v6.6.136 commit feba4907c30284b6d1ec0b350320242d4f288fc9 category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9232 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 4346be6577aaa04586167402ae87bbdbe32484a4 ] parse_probe_arg() accepts quoted immediate strings and passes the body after the opening quote to __parse_imm_string(). That helper currently computes strlen(str) and immediately dereferences str[len - 1], which underflows when the body is empty and not closed with double-quotation. Reject empty non-closed immediate strings before checking for the closing quote. Link: https://lore.kernel.org/all/20260401160315.88518-1-pengpeng@iscas.ac.cn/ Fixes: a42e3c4de964 ("tracing/probe: Add immediate string parameter support") Signed-off-by: Pengpeng Hou <pengpeng(a)iscas.ac.cn> Reviewed-by: Steven Rostedt (Google) <rostedt(a)goodmis.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat(a)kernel.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Tengda Wu <wutengda2(a)huawei.com> --- kernel/trace/trace_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index b168d6dd0773..6a96b03aae62 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -886,7 +886,7 @@ static int __parse_imm_string(char *str, char **pbuf, int offs) { size_t len = strlen(str); - if (str[len - 1] != '"') { + if (!len || str[len - 1] != '"') { trace_probe_log_err(offs + len, IMMSTR_NO_CLOSE); return -EINVAL; } -- 2.34.1
2 2
0 0
[PATCH OLK-6.6] tracepoint: balance regfunc() on func_add() failure in tracepoint_add_func()
by Tengda Wu 25 May '26

25 May '26
From: David Carlier <devnexen(a)gmail.com> stable inclusion from stable-v6.6.140 commit 247ed8a969f981bfba3112fd4bb441eaa6cef59c category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9232 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit fad217e16fded7f3c09f8637b0f6a224d58b5f2e ] When a tracepoint goes through the 0 -> 1 transition, tracepoint_add_func() invokes the subsystem's ext->regfunc() before attempting to install the new probe via func_add(). If func_add() then fails (for example, when allocate_probes() cannot allocate a new probe array under memory pressure and returns -ENOMEM), the function returns the error without calling the matching ext->unregfunc(), leaving the side effects of regfunc() behind with no installed probe to justify them. For syscall tracepoints this is particularly unpleasant: syscall_regfunc() bumps sys_tracepoint_refcount and sets SYSCALL_TRACEPOINT on every task. After a leaked failure, the refcount is stuck at a non-zero value with no consumer, and every task continues paying the syscall trace entry/exit overhead until reboot. Other subsystems providing regfunc()/unregfunc() pairs exhibit similarly scoped persistent state. Mirror the existing 1 -> 0 cleanup and call ext->unregfunc() in the func_add() error path, gated on the same condition used there so the unwind is symmetric with the registration. Fixes: 8cf868affdc4 ("tracing: Have the reg function allow to fail") Cc: stable(a)vger.kernel.org Cc: Masami Hiramatsu <mhiramat(a)kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Link: https://patch.msgid.link/20260413190601.21993-1-devnexen@gmail.com Signed-off-by: David Carlier <devnexen(a)gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt(a)goodmis.org> [ changed `tp->ext->unregfunc` to `tp->unregfunc` to match older struct layout ] Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Tengda Wu <wutengda2(a)huawei.com> --- kernel/tracepoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 8d1507dd0724..f7a4210d5d5e 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -337,6 +337,8 @@ static int tracepoint_add_func(struct tracepoint *tp, lockdep_is_held(&tracepoints_mutex)); old = func_add(&tp_funcs, func, prio); if (IS_ERR(old)) { + if (tp->unregfunc && !static_key_enabled(&tp->key)) + tp->unregfunc(); WARN_ON_ONCE(warn && PTR_ERR(old) != -ENOMEM); return PTR_ERR(old); } -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] tracepoint: balance regfunc() on func_add() failure in tracepoint_add_func()
by Tengda Wu 25 May '26

25 May '26
From: David Carlier <devnexen(a)gmail.com> mainline inclusion from mainline-v7.1-rc1 commit fad217e16fded7f3c09f8637b0f6a224d58b5f2e category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9232 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- When a tracepoint goes through the 0 -> 1 transition, tracepoint_add_func() invokes the subsystem's ext->regfunc() before attempting to install the new probe via func_add(). If func_add() then fails (for example, when allocate_probes() cannot allocate a new probe array under memory pressure and returns -ENOMEM), the function returns the error without calling the matching ext->unregfunc(), leaving the side effects of regfunc() behind with no installed probe to justify them. For syscall tracepoints this is particularly unpleasant: syscall_regfunc() bumps sys_tracepoint_refcount and sets SYSCALL_TRACEPOINT on every task. After a leaked failure, the refcount is stuck at a non-zero value with no consumer, and every task continues paying the syscall trace entry/exit overhead until reboot. Other subsystems providing regfunc()/unregfunc() pairs exhibit similarly scoped persistent state. Mirror the existing 1 -> 0 cleanup and call ext->unregfunc() in the func_add() error path, gated on the same condition used there so the unwind is symmetric with the registration. Fixes: 8cf868affdc4 ("tracing: Have the reg function allow to fail") Cc: stable(a)vger.kernel.org Cc: Masami Hiramatsu <mhiramat(a)kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Link: https://patch.msgid.link/20260413190601.21993-1-devnexen@gmail.com Signed-off-by: David Carlier <devnexen(a)gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt(a)goodmis.org> Signed-off-by: Tengda Wu <wutengda(a)huaweicloud.com> --- kernel/tracepoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 2dff7f1a27ec..33017d6806d2 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -358,6 +358,8 @@ static int tracepoint_add_func(struct tracepoint *tp, lockdep_is_held(&tracepoints_mutex)); old = func_add(&tp_funcs, func, prio); if (IS_ERR(old)) { + if (tp->ext && tp->ext->unregfunc && !static_key_enabled(&tp->key)) + tp->ext->unregfunc(); WARN_ON_ONCE(warn && PTR_ERR(old) != -ENOMEM); return PTR_ERR(old); } -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] net: yt6801: fix link info for yt6801
by Frank_Sae 25 May '26

25 May '26
yt6801 inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/7229 -------------------------------------------------------------------- fix the link info is not update on os installation. Fixes: 6460d9d3c42d ("yt6801: Add Motorcomm yt6801 PCIe driver") Signed-off-by: Frank_Sae <Frank.Sae(a)motor-comm.com> --- .../net/ethernet/motorcomm/yt6801/yt6801_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) mode change 100644 => 100755 drivers/net/ethernet/motorcomm/yt6801/yt6801_main.c diff --git a/drivers/net/ethernet/motorcomm/yt6801/yt6801_main.c b/drivers/net/ethernet/motorcomm/yt6801/yt6801_main.c old mode 100644 new mode 100755 index 01eed3ace3c6..93b7f41a2cb9 --- a/drivers/net/ethernet/motorcomm/yt6801/yt6801_main.c +++ b/drivers/net/ethernet/motorcomm/yt6801/yt6801_main.c @@ -27,6 +27,18 @@ const struct net_device_ops *fxgmac_get_netdev_ops(void); static void fxgmac_napi_enable(struct fxgmac_pdata *priv); +const struct ethtool_ops *fxgmac_get_ethtool_ops(void); + +static const struct ethtool_ops fxgmac_ethtool_ops = { + .get_link = ethtool_op_get_link, + .get_link_ksettings = phy_ethtool_get_link_ksettings, + .set_link_ksettings = phy_ethtool_set_link_ksettings +}; + +const struct ethtool_ops *fxgmac_get_ethtool_ops(void) +{ + return &fxgmac_ethtool_ops; +} #define PHY_WR_CONFIG(reg_offset) (0x8000205 + ((reg_offset) * 0x10000)) static int fxgmac_phy_write_reg(struct fxgmac_pdata *priv, u32 reg_id, u32 data) @@ -1898,7 +1910,9 @@ static int fxgmac_init(struct fxgmac_pdata *priv, bool save_private_reg) ndev->max_mtu = FXGMAC_JUMBO_PACKET_MTU + (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN); + ndev->netdev_ops = fxgmac_get_netdev_ops();/* Set device operations */ + ndev->ethtool_ops = fxgmac_get_ethtool_ops();/* Set device operations */ /* Set device features */ if (priv->hw_feat.tso) { -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] tracing: branch: Fix inverted check on stat tracer registration
by Tengda Wu 25 May '26

25 May '26
From: Breno Leitao <leitao(a)debian.org> mainline inclusion from mainline-v7.1-rc2 commit 3b75dd76e64a04771861bb5647951c264919e563 category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9232 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- init_annotated_branch_stats() and all_annotated_branch_stats() check the return value of register_stat_tracer() with "if (!ret)", but register_stat_tracer() returns 0 on success and a negative errno on failure. The inverted check causes the warning to be printed on every successful registration, e.g.: Warning: could not register annotated branches stats while leaving real failures silent. The initcall also returned a hard-coded 1 instead of the actual error. Invert the check and propagate ret so that the warning fires on real errors and the initcall reports the correct status. Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Cc: Ingo Molnar <mingo(a)elte.hu> Cc: Frederic Weisbecker <fweisbec(a)gmail.com> Link: https://patch.msgid.link/20260420-tracing-v1-1-d8f4cd0d6af1@debian.org Fixes: 002bb86d8d42 ("tracing/ftrace: separate events tracing and stats tracing engine") Signed-off-by: Breno Leitao <leitao(a)debian.org> Acked-by: Masami Hiramatsu (Google) <mhiramat(a)kernel.org> Signed-off-by: Steven Rostedt <rostedt(a)goodmis.org> Signed-off-by: Tengda Wu <wutengda(a)huaweicloud.com> --- kernel/trace/trace_branch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index e47fdb4c92fb..30f72e0ecb5d 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c @@ -379,10 +379,10 @@ __init static int init_annotated_branch_stats(void) int ret; ret = register_stat_tracer(&annotated_branch_stats); - if (!ret) { + if (ret) { printk(KERN_WARNING "Warning: could not register " "annotated branches stats\n"); - return 1; + return ret; } return 0; } @@ -444,10 +444,10 @@ __init static int all_annotated_branch_stats(void) int ret; ret = register_stat_tracer(&all_branch_stats); - if (!ret) { + if (ret) { printk(KERN_WARNING "Warning: could not register " "all branches stats\n"); - return 1; + return ret; } return 0; } -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] tracing: branch: Fix inverted check on stat tracer registration
by Tengda Wu 25 May '26

25 May '26
From: Breno Leitao <leitao(a)debian.org> stable inclusion from stable-v6.6.141 commit cbf460bf94921b1b07160cce6818d785af116bc8 category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9232 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 3b75dd76e64a04771861bb5647951c264919e563 ] init_annotated_branch_stats() and all_annotated_branch_stats() check the return value of register_stat_tracer() with "if (!ret)", but register_stat_tracer() returns 0 on success and a negative errno on failure. The inverted check causes the warning to be printed on every successful registration, e.g.: Warning: could not register annotated branches stats while leaving real failures silent. The initcall also returned a hard-coded 1 instead of the actual error. Invert the check and propagate ret so that the warning fires on real errors and the initcall reports the correct status. Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Cc: Ingo Molnar <mingo(a)elte.hu> Cc: Frederic Weisbecker <fweisbec(a)gmail.com> Link: https://patch.msgid.link/20260420-tracing-v1-1-d8f4cd0d6af1@debian.org Fixes: 002bb86d8d42 ("tracing/ftrace: separate events tracing and stats tracing engine") Signed-off-by: Breno Leitao <leitao(a)debian.org> Acked-by: Masami Hiramatsu (Google) <mhiramat(a)kernel.org> Signed-off-by: Steven Rostedt <rostedt(a)goodmis.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Tengda Wu <wutengda2(a)huawei.com> --- kernel/trace/trace_branch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index e47fdb4c92fb..30f72e0ecb5d 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c @@ -379,10 +379,10 @@ __init static int init_annotated_branch_stats(void) int ret; ret = register_stat_tracer(&annotated_branch_stats); - if (!ret) { + if (ret) { printk(KERN_WARNING "Warning: could not register " "annotated branches stats\n"); - return 1; + return ret; } return 0; } @@ -444,10 +444,10 @@ __init static int all_annotated_branch_stats(void) int ret; ret = register_stat_tracer(&all_branch_stats); - if (!ret) { + if (ret) { printk(KERN_WARNING "Warning: could not register " "all branches stats\n"); - return 1; + return ret; } return 0; } -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] crypto: pcrypt - Fix handling of MAY_BACKLOG requests
by Cai Xinchen 25 May '26

25 May '26
From: Herbert Xu <herbert(a)gondor.apana.org.au> mainline inclusion from mainline-v7.1-rc1 commit 915b692e6cb723aac658c25eb82c58fd81235110 category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15062 CVE: CVE-2026-43493 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- MAY_BACKLOG requests can return EBUSY. Handle them by checking for that value and filtering out EINPROGRESS notifications. Reported-by: Yiming Qian <yimingqian591(a)gmail.com> Fixes: 5a1436beec57 ("crypto: pcrypt - call the complete function on error") Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au> Conflicts: crypto/pcrypt.c [Only context conflicts.] Signed-off-by: Cai Xinchen <caixinchen1(a)huawei.com> --- crypto/pcrypt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index 2d7f98709e97..d545549e7a1a 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -69,6 +69,9 @@ static void pcrypt_aead_done(struct crypto_async_request *areq, int err) struct pcrypt_request *preq = aead_request_ctx(req); struct padata_priv *padata = pcrypt_request_padata(preq); + if (err == -EINPROGRESS) + return; + padata->info = err; padata_do_serial(padata); @@ -82,7 +85,7 @@ static void pcrypt_aead_enc(struct padata_priv *padata) ret = crypto_aead_encrypt(req); - if (ret == -EINPROGRESS) + if (ret == -EINPROGRESS || ret == -EBUSY) return; padata->info = ret; @@ -133,7 +136,7 @@ static void pcrypt_aead_dec(struct padata_priv *padata) ret = crypto_aead_decrypt(req); - if (ret == -EINPROGRESS) + if (ret == -EINPROGRESS || ret == -EBUSY) return; padata->info = ret; -- 2.34.1
2 1
0 0
内核崩溃协助排查 - openEuler 5.10.0-60.18.0.50.oe2203.x86_64
by 张宝 25 May '26

25 May '26
您好 openEuler 内核sig团队: &nbsp; &nbsp; &nbsp; 我司一台服务器(openEuler 22.03 LTS,内核 5.10.0-60.18.0.50.oe2203.x86_64,运行 342 天)发生内核崩溃,已收集到 vmcore。 根据openEuler Witty智能诊断Agent 诊断报告,发现内核可能存在bug,恳请协助排查。 当前状况 我们已在 openEuler 社区提交 Issue(链接:https://gitcode.com/openeuler/kernel/issues/9047),待明确根因和解决方案。 谢谢! 附 1.&nbsp;内核日志片段 [29613041.914241] ------------[ cut here ]------------ [29613041.914241] kernel BUG at kernel/entry/common.c:427! ... [29613041.914259] BUG: stack guard page was hit at 00000000089c7912 [29613041.914260] NMI watchdog: Watchdog detected hard LOCKUP on cpu 8 [29613041.914272] CPU: 8 PID: 1249797 Comm: lurker Kdump: loaded Not tainted 5.10.0-60.18.0.50.oe2203.x86_64 #1 [29613041.914273] RIP: 0010:native_queued_spin_lock_slowpath+0x5c/0x1b0 ... [29613041.914325] traps: PANIC: double fault, error_code: 0x0 2.&nbsp;PID 1249797 (lurker) 的堆栈回溯 PID: 1249797 &nbsp;TASK: ffff9c26fc228000 &nbsp;CPU: 8 &nbsp; COMMAND: "lurker" &nbsp;#0 [fffffe00001e2ee8] die at ffffffffa5e25b4a &nbsp;#1 [fffffe00001e2f10] handle_stack_overflow at ffffffffa67dca7b &nbsp;#2 [fffffe00001e2f28] exc_double_fault at ffffffffa6827a08 &nbsp;#3 [fffffe00001e2f50] asm_exc_double_fault at ffffffffa6a00b7e &nbsp; &nbsp; [exception RIP: bsearch+2] ... &nbsp;#160 [ffffa93bcf3b7958] no_context at ffffffffa5e71c37 &nbsp;#161 [ffffa93bcf3b7990] __bad_area_nosemaphore at ffffffffa5e71e62 &nbsp;#162 [ffffa93bcf3b79d8] exc_page_fault at ffffffffa682a565 &nbsp;#163 [ffffa93bcf3b7a30] asm_exc_page_fault at ffffffffa6a00ace &nbsp; &nbsp; [exception RIP: vma_dump_size+39] &nbsp; &nbsp; RIP: ffffffffa61d4fa7 &nbsp;RSP: ffffa93bcf3b7ae8 &nbsp;RFLAGS: 00010286 &nbsp; &nbsp; RAX: ffffffffb750aba0 &nbsp;RBX: ffff9c264e92f5c0 ... &nbsp;#164 [ffffa93bcf3b7af8] dump_vma_snapshot at ffffffffa61d6461 &nbsp;#165 [ffffa93bcf3b7b60] elf_core_dump at ffffffffa61cefc9 &nbsp;#166 [ffffa93bcf3b7d40] do_coredump at ffffffffa61d5e81 &nbsp;#167 [ffffa93bcf3b7e38] get_signal at ffffffffa5eefd6f &nbsp;#168 [ffffa93bcf3b7e88] arch_do_signal at ffffffffa5e21cda &nbsp;#169 [ffffa93bcf3b7f10] exit_to_user_mode_loop at ffffffffa5f6f309 &nbsp;#170 [ffffa93bcf3b7f30] exit_to_user_mode_prepare at ffffffffa5f6f3a2 &nbsp;#171 [ffffa93bcf3b7f48] irqentry_exit_to_user_mode at ffffffffa682ac65 &nbsp;#172 [ffffa93bcf3b7f50] asm_exc_page_fault at ffffffffa6a00ace 3.&nbsp;其他 CPU 的部分堆栈(CPU 1, 2, 7, 10, 14 均出现异常) CPU 1 (postgres): &nbsp;#3 [fffffe0000045f50] asm_exc_double_fault &nbsp; &nbsp; [exception RIP: do_error_trap+53] ... &nbsp;#8 [ffffa93bcd274170] do_error_trap &nbsp;#9 [ffffa93bcd2741b0] exc_invalid_op &nbsp;#10 [ffffa93bcd2741d0] asm_exc_invalid_op &nbsp; &nbsp; [exception RIP: fixup_exception+35] CPU 2 (log_server): &nbsp;#3 [ffffa93bcef97ce0] native_queued_spin_lock_slowpath ... &nbsp;#9 [ffffa93bcef97dc0] asm_exc_general_protection &nbsp; &nbsp; [exception RIP: do_renameat2+50] &nbsp; &nbsp; RIP: ffffffffa615e252 CPU 10 (df): &nbsp;#2 [fffffe0000258f50] asm_exc_double_fault &nbsp; &nbsp; [exception RIP: mmap_base+155] &nbsp; &nbsp; RIP: ffffffffa5e732eb &nbsp;RSP: 00000000029de8c0 4.&nbsp;智能Agent 工具分析结果 &nbsp; ZDNS 张宝
1 0
0 0
[PATCH OLK-6.6] pstore/ram: fix resource leak when ioremap() fails
by Luo Gengkun 25 May '26

25 May '26
From: Cole Leavitt <cole(a)unwrap.rs> mainline inclusion from mainline-v7.1-rc1 commit 2ddb69f686ef7a621645e97fc7329c50edf5d0e5 category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15064 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… ---------------------------------------------------------------------- In persistent_ram_iomap(), ioremap() or ioremap_wc() may return NULL on failure. Currently, if this happens, the function returns NULL without releasing the memory region acquired by request_mem_region(). This leads to a resource leak where the memory region remains reserved but unusable. Additionally, the caller persistent_ram_buffer_map() handles NULL correctly by returning -ENOMEM, but without this check, a NULL return combined with request_mem_region() succeeding leaves resources in an inconsistent state. This is the ioremap() counterpart to commit 05363abc7625 ("pstore: ram_core: fix incorrect success return when vmap() fails") which fixed a similar issue in the vmap() path. Fixes: 404a6043385d ("staging: android: persistent_ram: handle reserving and mapping memory") Signed-off-by: Cole Leavitt <cole(a)unwrap.rs> Link: https://patch.msgid.link/20260225235406.11790-1-cole@unwrap.rs Signed-off-by: Kees Cook <kees(a)kernel.org> Signed-off-by: Luo Gengkun <luogengkun2(a)huawei.com> --- fs/pstore/ram_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 7b6d6378a3b8..95675d4bab14 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -489,6 +489,10 @@ static void *persistent_ram_iomap(phys_addr_t start, size_t size, else va = ioremap_wc(start, size); + /* We must release the mem region if ioremap fails. */ + if (!va) + release_mem_region(start, size); + /* * Since request_mem_region() and ioremap() are byte-granularity * there is no need handle anything special like we do when the -- 2.34.1
2 1
0 0
Re: [PATCH OLK-6.6 4/4] iommu/arm-smmu-v3: Fix pgsize_bit for sva domains
by Qinxin Xia 25 May '26

25 May '26
On 2026/5/25 13:57:56, Greg KH <greg(a)kroah.com> wrote: > On Mon, May 25, 2026 at 10:35:39AM +0800, Qinxin Xia wrote: >> From: Balbir Singh <balbirs(a)nvidia.com> >> >> mainline inclusion >> from mainline-v6.15-rc5 >> commit 12f78021973ae422564b234136c702a305932d73 >> category: bugfix >> bugzilla: https://atomgit.com/openeuler/kernel/issues/9215 >> CVE: NA >> >> Reference: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/comm… > > What is this for? > > confused, > > greg k-h Sorry for the noise – I forgot to use --suppress-cc=all when sending the patch. Please ignore the previous email. Thanks. -- Thanks, Qinxin
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • ...
  • 2362
  • Older →

HyperKitty Powered by HyperKitty