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]
Message-id: <1482299071-22637-1-git-send-email-pankaj.dubey@samsung.com>
Date:   Wed, 21 Dec 2016 11:14:31 +0530
From:   Pankaj Dubey <pankaj.dubey@...sung.com>
To:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org
Cc:     m.szyprowski@...sung.com, robh+dt@...nel.org,
        frowand.list@...il.com, hans.verkuil@...co.com, krzk@...nel.org,
        kgene@...nel.org, Smitha T Murthy <smitha.t@...sung.com>,
        Pankaj Dubey <pankaj.dubey@...sung.com>
Subject: [PATCH] of: reserved_mem: set dma_ops for devices using reserved mem

From: Smitha T Murthy <smitha.t@...sung.com>

For some IPs, there may be virtual child devices created and for them its
necessary to set the dma_ops if it's using reserved memory else it will call
the dummy dma_ops during buffer operations for the child devices which will
lead to memory mapping failure.

Signed-off-by: Smitha T Murthy <smitha.t@...sung.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@...sung.com>
---
 drivers/of/of_reserved_mem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 366d8c3..d507c35 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 		mutex_lock(&of_rmem_assigned_device_mutex);
 		list_add(&rd->list, &of_rmem_assigned_device_list);
 		mutex_unlock(&of_rmem_assigned_device_mutex);
+		/* ensure that dma_ops is set for virtual devices
+		 * using reserved memory
+		 */
+		of_dma_configure(dev, np);
 
 		dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
 	} else {
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ