- update to 1.9.2:
* avoid coredump on build_one_dev_entry() * avoid double free on deinit_thermal() * change the log level in thermal.c * fix a minor typo - drop Avoid-double-free-on-deinit_thermal.patch, uninitialized.patch: (upstream) OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=109
This commit is contained in:
parent
5f44b46038
commit
d3f52b1702
@ -1,41 +0,0 @@
|
||||
From b25b1f92ca88aa9f268c93d0d7f66efc0ebf840b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
|
||||
Date: Tue, 25 Oct 2022 23:33:14 +0200
|
||||
Subject: [PATCH] Avoid double free on deinit_thermal()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
init_thermal() calls deinit_thermal() on error condition,
|
||||
as well as main() calls deinit_thermal() again, causing
|
||||
a double-free.
|
||||
|
||||
Signed-off-by: Dirk Müller <dirk@dmllr.de>
|
||||
---
|
||||
thermal.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/thermal.c b/thermal.c
|
||||
index 64a9cdf..1d44104 100644
|
||||
--- a/thermal.c
|
||||
+++ b/thermal.c
|
||||
@@ -506,8 +506,14 @@ static gboolean set_netlink_nonblocking(void)
|
||||
|
||||
void deinit_thermal(void)
|
||||
{
|
||||
- nl_cb_put(callback);
|
||||
- nl_socket_free(sock);
|
||||
+ if (callback) {
|
||||
+ nl_cb_put(callback);
|
||||
+ callback = NULL;
|
||||
+ }
|
||||
+ if (sock) {
|
||||
+ nl_socket_free(sock);
|
||||
+ sock = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.38.0
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aefd93332616f85c14458d0cffe9c1f4f68bce67ac194b001b9bf136fc8d0e34
|
||||
size 62126
|
BIN
irqbalance-1.9.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
irqbalance-1.9.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 7 12:23:32 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.9.2:
|
||||
* avoid coredump on build_one_dev_entry()
|
||||
* avoid double free on deinit_thermal()
|
||||
* change the log level in thermal.c
|
||||
* fix a minor typo
|
||||
- drop Avoid-double-free-on-deinit_thermal.patch, uninitialized.patch: (upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 25 21:09:07 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
Name: irqbalance
|
||||
Version: 1.9.1
|
||||
Version: 1.9.2
|
||||
Release: 0
|
||||
Summary: Daemon to balance IRQs on SMP machines
|
||||
License: GPL-2.0-or-later
|
||||
@ -30,9 +30,6 @@ URL: https://github.com/Irqbalance/irqbalance
|
||||
Source: https://github.com/Irqbalance/irqbalance/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source3: sysconfig.irqbalance
|
||||
Patch1: Set-fd-limit.patch
|
||||
Patch2: uninitialized.patch
|
||||
# https://github.com/Irqbalance/irqbalance/pull/243
|
||||
Patch3: Avoid-double-free-on-deinit_thermal.patch
|
||||
BuildRequires: libcap-ng-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 33c857d17b9af8a8a4dd785b8d511ba1f5d0bd88 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
|
||||
Date: Tue, 18 Oct 2022 23:08:31 +0200
|
||||
Subject: [PATCH] Avoid uninitialized read
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
irq_info struct is initialized on stack so the members need to
|
||||
be initalized to avoid a crash on uninitialized pointer dereference.
|
||||
|
||||
Signed-off-by: Dirk Müller <dirk@dmllr.de>
|
||||
---
|
||||
classify.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/classify.c b/classify.c
|
||||
index 3858754..5d3a9f0 100644
|
||||
--- a/classify.c
|
||||
+++ b/classify.c
|
||||
@@ -259,7 +259,7 @@ static gint compare_ints(gconstpointer a, gconstpointer b)
|
||||
|
||||
static void __add_banned_irq(int irq, GList **list)
|
||||
{
|
||||
- struct irq_info find, *new;
|
||||
+ struct irq_info find = {0}, *new;
|
||||
GList *entry;
|
||||
|
||||
find.irq = irq;
|
||||
@@ -394,7 +394,7 @@ get_numa_node:
|
||||
|
||||
void remove_one_irq_from_db(int irq)
|
||||
{
|
||||
- struct irq_info find, *tmp;
|
||||
+ struct irq_info find = {0}, *tmp;
|
||||
GList *entry = NULL;
|
||||
|
||||
find.irq = irq;
|
||||
@@ -646,7 +646,7 @@ static void build_one_dev_entry(const char *dirname, int build_irq)
|
||||
struct dirent *entry;
|
||||
DIR *msidir;
|
||||
int irqnum;
|
||||
- struct irq_info hint;
|
||||
+ struct irq_info hint = {0};
|
||||
char path[PATH_MAX];
|
||||
char devpath[PATH_MAX];
|
||||
|
||||
@@ -818,7 +818,7 @@ void for_each_irq(GList *list, void (*cb)(struct irq_info *info, void *data), vo
|
||||
struct irq_info *get_irq_info(int irq)
|
||||
{
|
||||
GList *entry;
|
||||
- struct irq_info find;
|
||||
+ struct irq_info find = {0};
|
||||
|
||||
find.irq = irq;
|
||||
entry = g_list_find_custom(interrupts_db, &find, compare_ints);
|
||||
@@ -832,7 +832,7 @@ struct irq_info *get_irq_info(int irq)
|
||||
void migrate_irq(GList **from, GList **to, struct irq_info *info)
|
||||
{
|
||||
GList *entry;
|
||||
- struct irq_info find, *tmp;
|
||||
+ struct irq_info find = {0}, *tmp;
|
||||
|
||||
find.irq = info->irq;
|
||||
entry = g_list_find_custom(*from, &find, compare_ints);
|
||||
--
|
||||
2.38.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user