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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Oct 2010 19:51:45 -0500
From:	Fernando Guzman Lugo <x0095840@...com>
To:	<gregkh@...e.de>
Cc:	<felipe.contreras@...ia.com>, <Hiroshi.DOYU@...ia.com>,
	<linux-kernel@...r.kernel.org>, <andy.shevchenko@...il.com>,
	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	Fernando Guzman Lugo <x0095840@...com>
Subject: [PATCH 7/8] staging: tidspbridge - fix some issues after iommu patches

This patch fixes:

* In delete_node() we need to check for udsp_heap_addr in order
  to unmap the head instead of udsp_heap_res_addr which used
  to be the reserved memory a not valid anymore.

* Fix in get_io_pages() as pointed by Felipe Contreras in this
  mail:

http://marc.info/?l=linux-kernel&m=128735502205183&w=2

Signed-off-by: Fernando Guzman Lugo <x0095840@...com>
---
 drivers/staging/tidspbridge/core/dsp-mmu.c |    2 +-
 drivers/staging/tidspbridge/rmgr/node.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/dsp-mmu.c b/drivers/staging/tidspbridge/core/dsp-mmu.c
index 3a00087..54f3ba4 100644
--- a/drivers/staging/tidspbridge/core/dsp-mmu.c
+++ b/drivers/staging/tidspbridge/core/dsp-mmu.c
@@ -196,7 +196,7 @@ static int get_io_pages(struct mm_struct *mm, u32 uva, unsigned pages,
 	int i;
 	struct page *pg;
 
-	for (i = 0; i < pages; i++) {
+	for (i = 0; i < pages; i++, uva += PAGE_SIZE) {
 		pa = user_va2_pa(mm, uva);
 
 		if (!pfn_valid(__phys_to_pfn(pa)))
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 3f5abcf..f7fe6c0 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -2541,7 +2541,7 @@ static void delete_node(struct node_object *hnode,
 			kfree(task_arg_obj.strm_out_def);
 			task_arg_obj.strm_out_def = NULL;
 		}
-		if (task_arg_obj.udsp_heap_res_addr) {
+		if (task_arg_obj.udsp_heap_addr) {
 			status = proc_un_map(hnode->hprocessor, (void *)
 					     task_arg_obj.udsp_heap_addr,
 					     pr_ctxt);
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists