summaryrefslogtreecommitdiffstats
path: root/lib/ts_bm.c
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-01-30 15:45:58 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-30 16:56:55 -0800
commitda4a04126baa3be03bc566d4a2ee0944c5e783d0 (patch)
treefec417b4bf836105091c4f32c481442c50cabefb /lib/ts_bm.c
parenteae70d06846199afc97524ed986b910836c0abe5 (diff)
downloadop-kernel-dev-da4a04126baa3be03bc566d4a2ee0944c5e783d0.zip
op-kernel-dev-da4a04126baa3be03bc566d4a2ee0944c5e783d0.tar.gz
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 <minchan@kernel.org> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Jerome Marchand <jmarchan@redhat.com> Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/ts_bm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud