From: flyingpenghao@gmail.com
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Peng Hao <flyingpeng@tencent.com>
Subject: [PATCH] buildid: use kmap_local_page()
Date: Wed, 6 Mar 2024 11:48:04 +0800 [thread overview]
Message-ID: <20240306034804.62087-1-flyingpeng@tencent.com> (raw)
From: Peng Hao <flyingpeng@tencent.com>
From: Peng Hao <flyingpeng@tencent.com>
Use kmap_local_page() instead of kmap_atomic() which has been
deprecated.
Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
lib/buildid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/buildid.c b/lib/buildid.c
index e3a7acdeef0e..29fdfb4cccf0 100644
--- a/lib/buildid.c
+++ b/lib/buildid.c
@@ -140,7 +140,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
return -EFAULT; /* page not mapped */
ret = -EINVAL;
- page_addr = kmap_atomic(page);
+ page_addr = kmap_local_page(page);
ehdr = (Elf32_Ehdr *)page_addr;
/* compare magic x7f "ELF" */
@@ -156,7 +156,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64)
ret = get_build_id_64(page_addr, build_id, size);
out:
- kunmap_atomic(page_addr);
+ kunmap_local(page_addr);
put_page(page);
return ret;
}
--
2.31.1
reply other threads:[~2024-03-06 3:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306034804.62087-1-flyingpeng@tencent.com \
--to=flyingpenghao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=flyingpeng@tencent.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®