Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp845867ybi; Fri, 12 Jul 2019 05:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyekUFgVq+zMmeeTLZIj7FeQ2hEt1fHQ8eoX9NLDtN9SZpgHRvI5iP+QfWMcv3Kq6yjKsIT X-Received: by 2002:a63:4554:: with SMTP id u20mr10893303pgk.406.1562935017885; Fri, 12 Jul 2019 05:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935017; cv=none; d=google.com; s=arc-20160816; b=KnEZ1/rhnHE4056MkF4qwBNiSWEuO7ytrG7wwN8czuRb3Y6uaRgNRyWBDR9sa4s8Km m5IjNBR8rfj6Yz7DYDdItxlnTCK4fUBqamsZo6yR5cJbjkqA821v1jrWNAd94SQgc7ci EfZN+5jTI376vN/z6j9+KwcvZXdpUBC2YcywnzMkesmXKx6W/i0WTVJzUANX3KCxBEr9 jCAiqCg6lI48cHg+HeAe4GoTDZwagf8o3TsTY+Lk0DsmhwGUVyTk6rTV3ncnUE+uO1FA tvY1MSGTBpCvnL1BUnjkuP0A916cW6o/h/Jtc4VjOATkxY2FdRuiDVRmQTF+Y3ejPrOO CmEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4MvmJumyG10bgmGDoTRw9ueZAUqthl/DV96anosKwzY=; b=WpcNpxZH/8VKlmwkGpZRrOOlsRH8bzFPKgNHk0uM9iDSDROHH7Bs7ZltjXjva3tVOK eGbCJaqrGeShUIgzXCaL63kkOO7290wg14mNawlvggDGruPH+UcPmPR/jNEDX3LO0AAT 2/Nz1HGPAAg54IlsDvPVyfq3Cca8534aMW75US1V8oWG7H1Yy4z+o0+40+sOtBP3YUSO 4jy8Lzj1KbrqlA2AgEQqTiV+7wKZnAer/7CjMqhzXlWKLGJjt55mdkERUcWepqw7i9JY ZaqNHnjnz5AuSCmzRwIWzEqpK9fTeNcf3cLmJEs8jSEkgF+03mPsZY82JsX7ggxYagVu ABew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FHGEr27k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q191si8157971pfq.63.2019.07.12.05.36.42; Fri, 12 Jul 2019 05:36:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FHGEr27k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729544AbfGLMfk (ORCPT + 99 others); Fri, 12 Jul 2019 08:35:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:54036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729717AbfGLMeS (ORCPT ); Fri, 12 Jul 2019 08:34:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D656F216B7; Fri, 12 Jul 2019 12:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934857; bh=810QhP04pMIX2PIb4dJFz81zjKz5dk8ZjqnXMiK9jNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FHGEr27kVxhipkJEhm1qkXO/BwB2Qm7NRI22Gu3KqkZ7PdYxbY7ODCznNtXj2awJG JQbm0tGIGKMDPlYgw/OyXbQXpxI3LbhzQzEEJVvQPBTpX0iLxx6k5fpcIExZbfFAxB 1lLpiTynaXTjvT0LVHYVB2nFxxJXr6w7vKu0jTIo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH 5.2 54/61] staging: vchiq: make wait events interruptible Date: Fri, 12 Jul 2019 14:20:07 +0200 Message-Id: <20190712121623.644648361@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121620.632595223@linuxfoundation.org> References: <20190712121620.632595223@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Saenz Julienne commit 77cf3f5dcf35c8f547f075213dbc15146d44cc76 upstream. The killable version of wait_event() is meant to be used on situations where it should not fail at all costs, but still have the convenience of being able to kill it if really necessary. Wait events in VCHIQ doesn't fit this criteria, as it's mainly used as an interface to V4L2 and ALSA devices. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -395,13 +395,21 @@ remote_event_create(wait_queue_head_t *w init_waitqueue_head(wq); } +/* + * All the event waiting routines in VCHIQ used a custom semaphore + * implementation that filtered most signals. This achieved a behaviour similar + * to the "killable" family of functions. While cleaning up this code all the + * routines where switched to the "interruptible" family of functions, as the + * former was deemed unjustified and the use "killable" set all VCHIQ's + * threads in D state. + */ static inline int remote_event_wait(wait_queue_head_t *wq, struct remote_event *event) { if (!event->fired) { event->armed = 1; dsb(sy); - if (wait_event_killable(*wq, event->fired)) { + if (wait_event_interruptible(*wq, event->fired)) { event->armed = 0; return 0; }