diff options
author | Minchan Kim <minchan@kernel.org> | 2014-12-12 16:56:58 -0800 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-06-12 21:20:17 +1000 |
commit | f2eb4e82d2aecc5f8e2b7fa654a090284a51c9f2 (patch) | |
tree | 502c6b3893e0523b3269ac94358dec665797544e /include | |
parent | d15bf007b7b7507fe1a13ba449dd73a7b0ffee4c (diff) | |
download | kernel_samsung_smdk4412-f2eb4e82d2aecc5f8e2b7fa654a090284a51c9f2.zip kernel_samsung_smdk4412-f2eb4e82d2aecc5f8e2b7fa654a090284a51c9f2.tar.gz kernel_samsung_smdk4412-f2eb4e82d2aecc5f8e2b7fa654a090284a51c9f2.tar.bz2 |
zsmalloc: correct fragile [kmap|kunmap]_atomic use
The kunmap_atomic should use virtual address getting by kmap_atomic.
However, some pieces of code in zsmalloc uses modified address, not the
one got by kmap_atomic for kunmap_atomic.
It's okay for working because zsmalloc modifies the address inner
PAGE_SIZE bounday so it works with current kmap_atomic's implementation.
But it's still fragile with potential changing of kmap_atomic so let's
correct it.
I got a subtle bug when I implemented a new feature of zsmalloc
(compaction) due to a link's mishandling (the link was over page
boundary). Although it was totally my mistake, it took a while to find
the cause because an unpredictable kmapped address was unmapped causing an
almost random crash.
Change-Id: Ic637e7d65e743a42df5833566054634c9a08f86d
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Seth Jennings <sjennings@variantweb.net>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions