Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp847662ybi; Fri, 12 Jul 2019 05:38:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY7YCauc/f6ZdWsF+szIXN1YbXmIjLBCJ1ZNpfaJNV2OY8gCHX6i47OB2YuWuAS58H7HSs X-Received: by 2002:a65:6401:: with SMTP id a1mr10698545pgv.42.1562935122710; Fri, 12 Jul 2019 05:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935122; cv=none; d=google.com; s=arc-20160816; b=HlQ3oSsUs2HZQQ/dQbfGG/OHhmoq0FwKIAvwFRN5mbe/7BPUpmY9CMYuWtw2yR1EO7 tAh8+GK8GKOvG0R4FpyJ9TK2vLZSzAZLiEgE07XJq/aIlKYcGJEWnATIDpKITQ8n5hoe m1pOCqenYTEoXPyaNq2M6w+13NjoJt8qQZgOKHm2+iHrEd9OWyE0NEATSYkElxrkvI1R fz/cvAMhA2z/O57z8kx+7MpQ4mn+hrMmGf9fEt/auRtaYw+I/f48ovnQk2ePGVpjTUfc Mohz16ahEwBdt7ZXHQBmQdGcJux0ReGQ/WKV9733EOfRwS2p8dAXScVYfHCMFJSeIlNV nBtw== 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=XMcONcbJtNum0D40EUsm3uAKd+XMChap192Y/tnrBF8=; b=Zsl4+Z2cBI8eOR0m/wtquw9C4nYfHtxPJ9TJ997lzpmXNBbKBsIdLo1FfaihTlteVD 9aYpz21YCWgfmD1OSFBBmZPsdN0Qos7iSbnAKgupoBsOIm57m3j6Jvtb9TYWRqmFj0L+ upUqY0MVmZDOIO6XkrNT1x2/Fofko+T/7caAkNJ7iMyF0nBiy9QieRa9Qw1x6bu5tKOe CDvZuijCfehcRuWJBkid4uFd42aYI6MTc8nKMYCOcis87Z0SZ0v3ysKjnAxs8Q5UK665 O46UfzEgfxs82fvCX1r5K/iAi7E8pXAA+Lg8pS1gt5z5kSnqCXsfYCTDqtMasLHXbyHQ r1kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vhy8tpum; 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 n13si7497104plp.354.2019.07.12.05.38.27; Fri, 12 Jul 2019 05:38:42 -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=vhy8tpum; 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 S1728567AbfGLMbO (ORCPT + 99 others); Fri, 12 Jul 2019 08:31:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729322AbfGLMbL (ORCPT ); Fri, 12 Jul 2019 08:31:11 -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 EF589216C4; Fri, 12 Jul 2019 12:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934670; bh=58trNl1YYzPIQ7PWuKmscffVcuOf21ZviBY7mfAQ7eE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vhy8tpumsKmCr4JywDP/3OprOywY90itBom6XytgePNQspJ4GHG7/bBMd/fBdXJM5 /az1iR0hoKJf0gG5pKLnkB4QfmfrChrT0JDTK3bJy9De0ODJcGZk5lBm7IuMzk5dCe ZvfTPKXrafILitm1qzqQURVrTYLOJezcZSo79qOw= 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.1 132/138] staging: vchiq: make wait events interruptible Date: Fri, 12 Jul 2019 14:19:56 +0200 Message-Id: <20190712121633.785406931@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@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 @@ -425,13 +425,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; }