Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1182182
| From | Frederic Weisbecker <fweisbec@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] smpboot: Fix memory leak on error handling |
| Date | 2015-07-11 18:00 +0200 |
| Message-ID | <pL5m2-4Xo-31@gated-at.bofh.it> (permalink) |
| References | <pL5m2-4Xo-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The cpumask is allocated before threads get created. If the latter step
fails, we need to free the cpumask.
Reviewed-by: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
kernel/smpboot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index 7c434c3..71aa90b 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -301,6 +301,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
ret = __smpboot_create_thread(plug_thread, cpu);
if (ret) {
smpboot_destroy_threads(plug_thread);
+ free_cpumask_var(plug_thread->cpumask);
goto out;
}
smpboot_unpark_thread(plug_thread, cpu);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] smpboot/watchdog: Fixes and cleanups v2 Frederic Weisbecker <fweisbec@gmail.com> - 2015-07-11 18:00 +0200 [PATCH 1/4] smpboot: Fix memory leak on error handling Frederic Weisbecker <fweisbec@gmail.com> - 2015-07-11 18:00 +0200 [PATCH 3/4] smpboot: Allow to pass the cpumask on per-cpu thread registration Frederic Weisbecker <fweisbec@gmail.com> - 2015-07-11 18:00 +0200
csiph-web