[PATCH] iucv: fix memory leak in cpu hotplug error path. - Kernel

This is a discussion on [PATCH] iucv: fix memory leak in cpu hotplug error path. - Kernel ; Fix memory leak in error path in CPU_UP_PREPARE notifier. Signed-off-by: Akinobu Mita Cc: David S. Miller Cc: netdev@vger.kernel.org Cc: Ursula Braun 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 ================================================== ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] iucv: fix memory leak in cpu hotplug error path.

  1. [PATCH] iucv: fix memory leak in cpu hotplug error path.

    Fix memory leak in error path in CPU_UP_PREPARE notifier.

    Signed-off-by: Akinobu Mita
    Cc: David S. Miller
    Cc: netdev@vger.kernel.org
    Cc: Ursula Braun
    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:
    --
    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/

  2. Re: [PATCH] iucv: fix memory leak in cpu hotplug error path.

    From: Akinobu Mita
    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


    Applied, thank you.
    --
    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/

+ Reply to Thread