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-next>] [day] [month] [year] [list]
Date:   Thu, 19 May 2022 23:29:43 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Sebastian Reichel <sre@...nel.org>, linux-kernel@...r.kernel.org
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
        Aaro Koskinen <aaro.koskinen@....fi>,
        Pavel Machek <pavel@....cz>
Subject: [PATCH] HSI: cmt_speech: Pass a pointer to virt_to_page()

A pointer into virtual memory is represented by a (void *)
not an u32, so the compiler warns:

drivers/hsi/clients/cmt_speech.c:1092:35: warning: passing argument
  1 of 'virt_to_pfn' makes pointer from integer without a cast
  [-Wint-conversion]

Fix this with an explicit cast.

Cc: Kai Vehmanen <kai.vehmanen@...ux.intel.com>
Cc: Aaro Koskinen <aaro.koskinen@....fi>
Cc: Pavel Machek <pavel@....cz>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/hsi/clients/cmt_speech.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
index e014ef36d872..8069f795c864 100644
--- a/drivers/hsi/clients/cmt_speech.c
+++ b/drivers/hsi/clients/cmt_speech.c
@@ -1089,7 +1089,7 @@ static vm_fault_t cs_char_vma_fault(struct vm_fault *vmf)
 	struct cs_char *csdata = vmf->vma->vm_private_data;
 	struct page *page;
 
-	page = virt_to_page(csdata->mmap_base);
+	page = virt_to_page((void *)csdata->mmap_base);
 	get_page(page);
 	vmf->page = page;
 
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ