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:13:06 -0000 Received: from mga02.intel.com ([134.134.136.20]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gxvO6-0001SY-1d for speck@linutronix.de; Sun, 24 Feb 2019 16:08:18 +0100 From: Andi Kleen Subject: [MODERATED] [PATCH v6 39/43] MDSv6 Date: Sun, 24 Feb 2019 07:07:45 -0800 Message-Id: <4e5e24fd0c2111686f32a55581efa5070cf0a160.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: Most USB interrupt handlers do not touch user data, except in some cases hcd poll is called which can copy a user buffer. Instead of marking all the USB interrupts and timers as clear cpu only clear it when the user data touching actually happens. Signed-off-by: Andi Kleen --- drivers/usb/core/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 015b126ce455..be47f96e810d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -770,6 +771,8 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) urb->actual_length = length; memcpy(urb->transfer_buffer, buffer, length); + lazy_clear_cpu_interrupt(); + usb_hcd_unlink_urb_from_ep(hcd, urb); usb_hcd_giveback_urb(hcd, urb, 0); } else { -- 2.17.2