From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 24 Feb 2019 15:08:31 -0000 Received: from mga05.intel.com ([192.55.52.43]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gxvNt-0001Rr-Az for speck@linutronix.de; Sun, 24 Feb 2019 16:08:06 +0100 From: Andi Kleen Subject: [MODERATED] [PATCH v6 22/43] MDSv6 Date: Sun, 24 Feb 2019 07:07:28 -0800 Message-Id: <8ac686596e570cf68000220b07fd4053545e09a9.1551019522.git.ak@linux.intel.com> In-Reply-To: References: In-Reply-To: References: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de Cc: Andi Kleen List-ID: Schedule a cpu clear on next kernel exit for swiotlb running in interrupt context, since it touches user data with the CPU. Signed-off-by: Andi Kleen --- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 1fb6fd68b9c7..6123174a5f2c 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -422,6 +423,7 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, } else { memcpy(phys_to_virt(orig_addr), vaddr, size); } + lazy_clear_cpu_interrupt(); } phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, -- 2.17.2