Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tomoyo: Use local kmap in tomoyo_dump_page()

Replace the now deprecated kmap_atomic() with kmap_local_page().

The memcpy does not need atomic semantics, and the removed comment
is now stale - this patch now makes it in sync again. Last but not
least, highmem is going to be removed[0].

Link: https://lore.kernel.org/all/4ff89b72-03ff-4447-9d21-dd6a5fe1550f@app.fastmail.com/ [0]
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

authored by

Davidlohr Bueso and committed by
Tetsuo Handa
a9ea3a2e 7d0a66e4

+2 -7
+2 -7
security/tomoyo/domain.c
··· 934 934 #endif 935 935 if (page != dump->page) { 936 936 const unsigned int offset = pos % PAGE_SIZE; 937 - /* 938 - * Maybe kmap()/kunmap() should be used here. 939 - * But remove_arg_zero() uses kmap_atomic()/kunmap_atomic(). 940 - * So do I. 941 - */ 942 - char *kaddr = kmap_atomic(page); 937 + char *kaddr = kmap_local_page(page); 943 938 944 939 dump->page = page; 945 940 memcpy(dump->data + offset, kaddr + offset, 946 941 PAGE_SIZE - offset); 947 - kunmap_atomic(kaddr); 942 + kunmap_local(kaddr); 948 943 } 949 944 /* Same with put_arg_page(page) in fs/exec.c */ 950 945 #ifdef CONFIG_MMU