lkml.org 
[lkml]   [2019]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH AUTOSEL 5.2 014/171] consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c
On Fri, Jul 19, 2019 at 07:03:31PM +0900, Greg Kroah-Hartman wrote:
>On Thu, Jul 18, 2019 at 11:54:05PM -0400, Sasha Levin wrote:
>> From: Gen Zhang <blackgod016574@gmail.com>
>>
>> [ Upstream commit 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac ]
>>
>> In function con_insert_unipair(), when allocation for p2 and p1[n]
>> fails, ENOMEM is returned, but previously allocated p1 is not freed,
>> remains as leaking memory. Thus we should free p1 as well when this
>> allocation fails.
>>
>> Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
>> Reviewed-by: Kees Cook <keescook@chromium.org>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> drivers/tty/vt/consolemap.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>No, please do not take this patch, it was reverted in commit
>15b3cd8ef46a ("Revert "consolemap: Fix a memory leaking bug in
>drivers/tty/vt/consolemap.c"") because it was broken.
>
>Please drop from all of the autosel queues.

Now dropped, thanks!

--
Thanks,
Sasha

\
 
 \ /
  Last update: 2019-07-28 17:28    [W:0.134 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site