diff options
| author | Minchan Kim <minchan@kernel.org> | 2014-01-30 15:45:58 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2016-12-11 12:59:17 +0100 |
| commit | 43052051519003e4f6a5a1d2b75236036e50a819 (patch) | |
| tree | 193ef8ad64e4b7b67d52f10315c565d6ff9f95e5 /include/linux/dynamic_queue_limits.h | |
| parent | b591c4bdf94cbd11b744b4467fd5907650c7203a (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 <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 'include/linux/dynamic_queue_limits.h')
0 files changed, 0 insertions, 0 deletions
