lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <157140288978.29376.16956109153818084888.tip-bot2@tip-bot2>
Date:   Fri, 18 Oct 2019 12:48:09 -0000
From:   "tip-bot2 for Yunfeng Ye" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Yunfeng Ye <yeyunfeng@...wei.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>, <jolsa@...hat.co>,
        <acme@...nel.org>, <mingo@...hat.com>, <mark.rutland@....com>,
        <namhyung@...nel.org>, <alexander.shishkin@...ux.intel.com>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
        linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/ring_buffer: Modify the parameter type of
 perf_mmap_free_page()

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     8a9f91c51ea72b126864e0db616b1bac12261200
Gitweb:        https://git.kernel.org/tip/8a9f91c51ea72b126864e0db616b1bac12261200
Author:        Yunfeng Ye <yeyunfeng@...wei.com>
AuthorDate:    Mon, 14 Oct 2019 16:14:59 +08:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 17 Oct 2019 21:31:55 +02:00

perf/ring_buffer: Modify the parameter type of perf_mmap_free_page()

In perf_mmap_free_page(), the unsigned long type is converted to the
pointer type, but where the call is made, the pointer type is converted
to the unsigned long type. There is no need to do these operations.

Modify the parameter type of perf_mmap_free_page() to pointer type.

Signed-off-by: Yunfeng Ye <yeyunfeng@...wei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: <jolsa@...hat.co>
Cc: <acme@...nel.org>
Cc: <mingo@...hat.com>
Cc: <mark.rutland@....com>
Cc: <namhyung@...nel.org>
Cc: <alexander.shishkin@...ux.intel.com>
Link: https://lkml.kernel.org/r/e6ae3f0c-d04c-50f9-544a-aee3b30330cd@huawei.com
---
 kernel/events/ring_buffer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index ffb59a4..abc145c 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -799,9 +799,9 @@ fail:
 	return NULL;
 }
 
-static void perf_mmap_free_page(unsigned long addr)
+static void perf_mmap_free_page(void *addr)
 {
-	struct page *page = virt_to_page((void *)addr);
+	struct page *page = virt_to_page(addr);
 
 	page->mapping = NULL;
 	__free_page(page);
@@ -811,9 +811,9 @@ void rb_free(struct ring_buffer *rb)
 {
 	int i;
 
-	perf_mmap_free_page((unsigned long)rb->user_page);
+	perf_mmap_free_page(rb->user_page);
 	for (i = 0; i < rb->nr_pages; i++)
-		perf_mmap_free_page((unsigned long)rb->data_pages[i]);
+		perf_mmap_free_page(rb->data_pages[i]);
 	kfree(rb);
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ