diff options
author | Minchan Kim <[email protected]> | 2014-01-30 15:45:58 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-01-30 16:56:55 -0800 |
commit | da4a04126baa3be03bc566d4a2ee0944c5e783d0 (patch) | |
tree | fec417b4bf836105091c4f32c481442c50cabefb /tools/perf/util/trace-event-scripting.c | |
parent | eae70d06846199afc97524ed986b910836c0abe5 (diff) |
zram: fix race between reset and flushing pending work
Dan and Sergey reported that there is a racy between reset and flushing
of pending work so that it could make oops by freeing zram->meta in
reset while zram_slot_free can access zram->meta if new request is
adding during the race window.
This patch moves flush after taking init_lock so it prevents new request
so that it closes the race.
Signed-off-by: Minchan Kim <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Jerome Marchand <[email protected]>
Tested-by: Sergey Senozhatsky <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions