diff options
author | Weijie Yang <[email protected]> | 2014-10-29 14:50:57 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-10-29 16:33:15 -0700 |
commit | 5a99e95b8d1cd47f6feddcdca6c71d22060df8a2 (patch) | |
tree | 51384759dcfdc6e189139a5a58a5df7f6e16f56b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8aba7e0a2c02355f9a7dec629635cb7093fe0508 (diff) |
zram: avoid NULL pointer access in concurrent situation
There is a rare NULL pointer bug in mem_used_total_show() and
mem_used_max_store() in concurrent situation, like this:
zram is not initialized, process A is a mem_used_total reader which runs
periodically, 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 <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Acked-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions