Re: [tip:sched/core] sched/rt: Fix memory leak in alloc_rt_sched_group()

From: Ingo Molnar
Date: Tue Jul 07 2015 - 02:46:01 EST



* Anshul Garg <aksgarg1989@xxxxxxxxx> wrote:

> Dear linux community,
>
> I think this patch" sched/rt: Fix memory leak in
> alloc_rt_sched_group()" with Commit-ID:
> ecdd6804b7c9e15fe8fc836ba0233d9912834e8b is not correct.
>
> As it will create panic in case of kzalloc failure because of doingkfree twice.
>
> As if alloc_rt_sched_group fails it will return zero then core.c will
> call free_sched_group in core.c
> which subsequently calls free_rt_sched_group .
>
> In free_rt_sched_group memory is getting freed properly.
>
> so it seems patch sent by me is not correct.
>
> Please help to review patch once again as it might break some things.
>
> Sorry for inconvenience.
>
> Thanks
> Anshul Garg

Ok, I've removed this patch.

Thanks!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/