irqbalance: parse_proc_interrupts: fix parsing interrupt counts
parse_proc_interrupts: fix parsing interrupt counts Signed-off-by: qinyu <qinyu32@huawei.com>
This commit is contained in:
parent
dc6155df16
commit
f2a2be426e
@ -0,0 +1,29 @@
|
||||
From 0a82dddbaf5702caded0d0d83a6eafaca743254d Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Mon, 27 Jun 2022 13:43:04 +0200
|
||||
Subject: [PATCH] parse_proc_interrupts: fix parsing interrupt counts
|
||||
|
||||
The name of an interrupt chip can start with a number, stop before it.
|
||||
|
||||
Reference: https://github.com/Irqbalance/irqbalance/commit/0a82dddbaf5702caded0d0d83a6eafaca743254d
|
||||
Conflict: NA
|
||||
|
||||
---
|
||||
procinterrupts.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/procinterrupts.c b/procinterrupts.c
|
||||
index 57c8801..d90bf6d 100644
|
||||
--- a/procinterrupts.c
|
||||
+++ b/procinterrupts.c
|
||||
@@ -331,7 +331,7 @@ void parse_proc_interrupts(void)
|
||||
while (1) {
|
||||
uint64_t C;
|
||||
C = strtoull(c, &c2, 10);
|
||||
- if (c==c2) /* end of numbers */
|
||||
+ if (c==c2 || !strchr(" \t", *c2)) /* end of numbers */
|
||||
break;
|
||||
count += C;
|
||||
c=c2;
|
||||
--
|
||||
2.23.0
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: A dynamic adaptive IRQ balancing daemon
|
||||
Name: irqbalance
|
||||
Version: 1.7.0
|
||||
Release: 15
|
||||
Release: 16
|
||||
Epoch: 3
|
||||
License: GPLv2
|
||||
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
|
||||
@ -34,6 +34,7 @@ Patch6009: backport-Fix-irqbalance-cannot-obtain-the-full-name-of-irq.patch
|
||||
Patch6010: backport-Fix-compile-issue-with-none-AARCH64-builds.patch
|
||||
Patch6011: backport-remove-no-existing-irq-in-banned_irqs.patch
|
||||
Patch6012: backport-Add-0-to-the-end-of-strings-to-avoid-heap-buffer-ove.patch
|
||||
Patch6013: backport-Fix-parse_proc_interrupts-fix-parsing-interrupt-counts.patch
|
||||
|
||||
%description
|
||||
Irqbalance is a daemon to help balance the cpu load generated by
|
||||
@ -91,6 +92,12 @@ fi
|
||||
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-16
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC: parse_proc_interrupts: fix parsing interrupt counts
|
||||
|
||||
* Thu Jan 5 2023 qinyu <qinyu32@huawei.com> - 3:1.7.0-15
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user