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]
Message-Id: <20180214015008.9513-10-dongwon.kim@intel.com>
Date:   Tue, 13 Feb 2018 17:50:08 -0800
From:   Dongwon Kim <dongwon.kim@...el.com>
To:     linux-kernel@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
        xen-devel@...ts.xenproject.org
Cc:     dri-devel@...ts.freedesktop.org, dongwon.kim@...el.com,
        mateuszx.potrola@...el.com, sumit.semwal@...aro.org
Subject: [RFC PATCH v2 9/9] hyper_dmabuf: threaded interrupt in Xen-backend

Use threaded interrupt intead of regular one because most part of ISR
is time-critical and possibly sleeps

Signed-off-by: Dongwon Kim <dongwon.kim@...el.com>
---
 .../hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c b/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c
index 30bc4b6304ac..65af5ddfb2d7 100644
--- a/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c
+++ b/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c
@@ -332,11 +332,14 @@ int xen_be_init_tx_rbuf(int domid)
 	}
 
 	/* setting up interrupt */
-	ret = bind_evtchn_to_irqhandler(alloc_unbound.port,
-					front_ring_isr, 0,
-					NULL, (void *) ring_info);
+	ring_info->irq = bind_evtchn_to_irq(alloc_unbound.port);
 
-	if (ret < 0) {
+	ret = request_threaded_irq(ring_info->irq,
+				   NULL,
+				   front_ring_isr,
+				   IRQF_ONESHOT, NULL, ring_info);
+
+	if (ret != 0) {
 		dev_err(hy_drv_priv->dev,
 			"Failed to setup event channel\n");
 		close.port = alloc_unbound.port;
@@ -348,7 +351,6 @@ int xen_be_init_tx_rbuf(int domid)
 	}
 
 	ring_info->rdomain = domid;
-	ring_info->irq = ret;
 	ring_info->port = alloc_unbound.port;
 
 	mutex_init(&ring_info->lock);
@@ -535,9 +537,10 @@ int xen_be_init_rx_rbuf(int domid)
 	if (!xen_comm_find_tx_ring(domid))
 		ret = xen_be_init_tx_rbuf(domid);
 
-	ret = request_irq(ring_info->irq,
-			  back_ring_isr, 0,
-			  NULL, (void *)ring_info);
+	ret = request_threaded_irq(ring_info->irq,
+				   NULL,
+				   back_ring_isr, IRQF_ONESHOT,
+				   NULL, (void *)ring_info);
 
 	return ret;
 
-- 
2.16.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ