From 5ab0095a07b78bc5bcb435089f986329645ca20a Mon Sep 17 00:00:00 2001 From: qinyu Date: Wed, 1 Feb 2023 11:24:48 +0800 Subject: [PATCH] irqbalance: remove an unused patch remove an unused patch Signed-off-by: qinyu --- ...name-in-add_new_irq-to-avoid-segment.patch | 81 ------------------- irqbalance.spec | 8 +- 2 files changed, 7 insertions(+), 82 deletions(-) delete mode 100644 bugfix-set-hint-name-in-add_new_irq-to-avoid-segment.patch diff --git a/bugfix-set-hint-name-in-add_new_irq-to-avoid-segment.patch b/bugfix-set-hint-name-in-add_new_irq-to-avoid-segment.patch deleted file mode 100644 index 3021594..0000000 --- a/bugfix-set-hint-name-in-add_new_irq-to-avoid-segment.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 6f0ea91bfa9ee3016abf694e6fb9f46e7c847cc1 Mon Sep 17 00:00:00 2001 -From: SuperSix173 -Date: Mon, 1 Nov 2021 11:40:39 +0800 -Subject: [PATCH] bugfix: set hint->name in add_new_irq to avoid segmentation - fault - -hint->name is uninitialized in add_new_irq, so segmentation fault occurs -when calling strstr in get_usr_irq_policy - -Signed-off-by: SuperSix173 ---- - classify.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/classify.c b/classify.c -index c5a2a35..560e932 100644 ---- a/classify.c -+++ b/classify.c -@@ -607,6 +607,7 @@ static void add_new_irq(char *path, struct irq_info *hint, GList *proc_interrupt - struct irq_info *new; - struct user_irq_policy pol; - int irq = hint->irq; -+ GList *entry; - - new = get_irq_info(irq); - if (new) -@@ -620,6 +621,11 @@ static void add_new_irq(char *path, struct irq_info *hint, GList *proc_interrupt - __add_banned_irq(irq, &banned_irqs); - new = get_irq_info(irq); - } else { -+ if (!hint->name) { -+ entry = g_list_find_custom(proc_interrupts, hint, compare_ints); -+ if (entry) -+ hint->name = ((struct irq_info *)entry->data)->name; -+ } - new = add_one_irq_to_db(path, hint, &pol); - if ((new != NULL) && (user_policy_list != NULL)) { - set_usr_irq_policy(hint->name, new); -@@ -660,6 +666,7 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs, int build_ - if (irqnum && ((build_irq < 0) || (irqnum == build_irq))) { - hint.irq = irqnum; - hint.type = IRQ_TYPE_MSIX; -+ hint.name = NULL; - add_new_irq(devpath, &hint, tmp_irqs); - if (build_irq >= 0) { - log(TO_CONSOLE, LOG_INFO, "Hotplug dev irq: %d finished.\n", irqnum); -@@ -688,6 +695,7 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs, int build_ - if ((build_irq < 0) || (irqnum == build_irq)) { - hint.irq = irqnum; - hint.type = IRQ_TYPE_LEGACY; -+ hint.name = NULL; - add_new_irq(devpath, &hint, tmp_irqs); - if (build_irq >= 0) - log(TO_CONSOLE, LOG_INFO, "Hotplug dev irq: %d finished.\n", irqnum); -@@ -764,11 +772,13 @@ static struct irq_info * build_dev_irqs(GList *tmp_irqs, int build_irq) - int proc_irq_hotplug(char *savedline, int irq, struct irq_info **pinfo) - { - struct irq_info tmp_info = {0}; -+ GList *tmp_list = NULL; - - /* firstly, init irq info by parse savedline */ - init_irq_class_and_type(savedline, &tmp_info, irq); -+ tmp_list = g_list_append(tmp_list, &tmp_info); - /* secondly, init irq info by read device info */ -- *pinfo = build_dev_irqs(interrupts_db, irq); -+ *pinfo = build_dev_irqs(tmp_list, irq); - if (*pinfo == NULL) { - add_new_irq(NULL, &tmp_info, interrupts_db); - *pinfo = get_irq_info(irq); -@@ -779,6 +789,8 @@ int proc_irq_hotplug(char *savedline, int irq, struct irq_info **pinfo) - } - - force_rebalance_irq(*pinfo, NULL); -+ free(tmp_info.name); -+ g_list_free(tmp_list); - return 0; - } - --- -1.8.3.1 - diff --git a/irqbalance.spec b/irqbalance.spec index 483b17b..305dfcd 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,7 +1,7 @@ Summary: A dynamic adaptive IRQ balancing daemon Name: irqbalance Version: 1.9.2 -Release: 1 +Release: 2 Epoch: 3 License: GPLv2 Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/irqbalance-%{version}.tar.gz @@ -118,6 +118,12 @@ fi /sbin/chkconfig --del %{name} >/dev/null 2>&1 || : %changelog +* Wed Feb 1 2023 qinyu - 3:1.9.2-2 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC: remove an unused patch + * Tue Jan 31 2023 qinyu - 3:1.9.2-1 - Type:bugfix - ID:NA