Projects
Eulaceura:Factory
irqbalance
_service:obs_scm:backport-0002-activate_mapping...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-0002-activate_mapping-make-sure-to-catch-all-errors.patch of Package irqbalance
From 470a64b190628574c28a266bdcf8960291463191 Mon Sep 17 00:00:00 2001 From: Robin Jarry <rjarry@redhat.com> Date: Wed, 12 Jul 2023 08:51:08 +0200 Subject: [PATCH] activate_mapping: make sure to catch all errors Reference: https://github.com/Irqbalance/irqbalance/commit/470a64b190628574c28a266bdcf8960291463191 Conflict: NA fprintf() is buffered and may not report an error which may be deferred when fflush() is called (either explicitly or internally by fclose()). Check for errors returned by fopen(), fprintf() and fclose() and add IRQ_FLAG_AFFINITY_UNMANAGED accordingly. Fixes: 55c5c321c73e ("arm64: Add irq aff change check For aarch64, ...") Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2184735 Signed-off-by: Robin Jarry <rjarry@redhat.com> --- activate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/activate.c b/activate.c index 6f8af27..a4112e0 100644 --- a/activate.c +++ b/activate.c @@ -75,16 +75,16 @@ static void activate_mapping(struct irq_info *info, void *data __attribute__((un sprintf(buf, "/proc/irq/%i/smp_affinity", info->irq); file = fopen(buf, "w"); if (!file) - return; + goto error; cpumask_scnprintf(buf, PATH_MAX, applied_mask); ret = fprintf(file, "%s", buf); - if (ret < 0) { - log(TO_ALL, LOG_WARNING, "cannot change IRQ %i affinity, will never try again\n", info->irq); - info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED; - } - fclose(file); + if (fclose(file) || ret < 0) + goto error; info->moved = 0; /*migration is done*/ +error: + log(TO_ALL, LOG_WARNING, "cannot change IRQ %i affinity, will never try again\n", info->irq); + info->flags |= IRQ_FLAG_AFFINITY_UNMANAGED; } void activate_mappings(void) -- 2.28.0.windows.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2