mm/highmem: Take kmap_high_get() properly into account
authorThomas Gleixner <tglx@linutronix.de>
Thu, 12 Nov 2020 10:59:32 +0000 (11:59 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 12 Nov 2020 13:44:38 +0000 (14:44 +0100)
commit2a656cad337e0e1ca582f58847d7b0c7eeba4dc8
tree1c9e527318ff3af65f52d4076da2a2ebfcf2e4f0
parent13f876ba77ebd5125799bb042201f22cf73df154
mm/highmem: Take kmap_high_get() properly into account

kunmap_local() warns when the virtual address to unmap is below
PAGE_OFFSET. This is correct except for the case that the mapping was
obtained via kmap_high_get() because the PKMAP addresses are right below
PAGE_OFFSET.

Cure it by skipping the WARN_ON() when the unmap was handled by
kunmap_high().

Fixes: 298fa1ad5571 ("highmem: Provide generic variant of kmap_atomic*")
Reported-by: vtolkm@googlemail.com
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/87y2j6n8mj.fsf@nanos.tec.linutronix.de
mm/highmem.c