lkml.org 
[lkml]   [2014]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] zram: avoid NULL pointer access when reading mem_used_total
On Sat, Oct 25, 2014 at 05:26:31PM +0800, Weijie Yang wrote:
> There is a rare NULL pointer bug in mem_used_total_show() in concurrent
> situation, like this:
> zram is not initialized, process A is a mem_used_total reader which runs
> periodicity, while process B try to init zram.
>
> process A process B
> access meta, get a NULL value
> init zram, done
> init_done() is true
> access meta->mem_pool, get a NULL pointer BUG
>
> This patch fixes this issue.
>
> Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks!

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2014-10-26 03:21    [W:0.044 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site