* [PATCH] iucv: fix memory leak in cpu hotplug error path.
@ 2008-07-15 8:10 Akinobu Mita
2008-07-15 9:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2008-07-15 8:10 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller, netdev, Ursula Braun, linux390, linux-s390
Fix memory leak in error path in CPU_UP_PREPARE notifier.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
---
net/iucv/iucv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: 2.6-mmotm/net/iucv/iucv.c
===================================================================
--- 2.6-mmotm.orig/net/iucv/iucv.c
+++ 2.6-mmotm/net/iucv/iucv.c
@@ -567,8 +567,11 @@ static int __cpuinit iucv_cpu_notify(str
return NOTIFY_BAD;
iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param),
GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
- if (!iucv_param[cpu])
+ if (!iucv_param[cpu]) {
+ kfree(iucv_irq_data[cpu]);
+ iucv_irq_data[cpu] = NULL;
return NOTIFY_BAD;
+ }
break;
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iucv: fix memory leak in cpu hotplug error path.
2008-07-15 8:10 [PATCH] iucv: fix memory leak in cpu hotplug error path Akinobu Mita
@ 2008-07-15 9:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-07-15 9:10 UTC (permalink / raw)
To: akinobu.mita; +Cc: linux-kernel, netdev, ubraun, linux390, linux-s390
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Tue, 15 Jul 2008 17:10:25 +0900
> Fix memory leak in error path in CPU_UP_PREPARE notifier.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-15 9:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 8:10 [PATCH] iucv: fix memory leak in cpu hotplug error path Akinobu Mita
2008-07-15 9:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).