Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2401315lqp; Sun, 24 Mar 2024 17:58:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJmc8IVHbC0pQjRu4bbWj+dMTElAr+StvmuKNY9JLT11U7sYYltcru60Dhtt+3sptV4A+tSQXjmCRm1lENaEfNyAE+M7lw6SZMaShMNQ== X-Google-Smtp-Source: AGHT+IEk90n0A0feDbaJbQImRRZ7m9yHdGri7SDuXxnxA2v7pzhKeiftmS3vsGybzGbkqSAilh3+ X-Received: by 2002:a05:6902:50e:b0:dc6:d2d3:a57c with SMTP id x14-20020a056902050e00b00dc6d2d3a57cmr3485294ybs.59.1711328312101; Sun, 24 Mar 2024 17:58:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328312; cv=pass; d=google.com; s=arc-20160816; b=sByvfbrXki2rqXXWJJFBikrXVNhlqv/NmF81NCYTBMVpEAHKq4kdbleyeB34N4uh3X xKjnK/Bk+mmhBAOgM7tfzB//7JIAyYEeugteaHaHxv9+MFuAsNjY+JjLbCdqOBNjdZDd kzpxXFRbGzSh6W6eStQhKXK2pSEZPinIaNOzwdpUqBoBSbgEOWQ416q9iMbWbnNJ3044 UFoGyhj6ruLBra48L38VhOo9WwsW0aFixEvwmcRVGPFg8DvfXIi8Yr2xvnrYM96NLLNW 4yfX+VE4IZ5vcO4qoLXWi0UOb77GHBfhnt4AuZVhKGh0uGMazKRXQ2f7uL05LhLODxTd femA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tOcIZbUBZmoB/jUTGmg46c8xWySVh+wz2WWvjve3mP4=; fh=eUHZ4eNukG9n0kWymJpOuaUcZ4MCQlb/ohIeDvid0So=; b=xeEy6Jqa/P8Ec2zQmn9olf/dzFKEg2VpZ1xp4kXiV4WgRWSrt7yC8nhaO96UjNHQBR 17DgEyXfUu5sbZUUom814zkSB8wzJf5AckzNgssxOt4emM7e+SX2rCrzVZfPnRsLTYAK KOunDeWjemBGsNiawH7A49UDyxkB6QWZx/54ZuO1f0oJ0Tok286SQDFXwYOwnUnXmul1 ecNNQi+DnmLytZz8Sbuvsgw6igMKmHLE4LQpq7gBX9DsJ1fU6IfKj2DT3QWtAClATdZW oly7k/6DbirR5oAMzx3MNIZgv88wBAGbgTM6huc5uT+0wVZosESjV9a7RiTq5gcr54N0 tx4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ay26U6aj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z16-20020a631910000000b005e438e99d4esi6608967pgl.144.2024.03.24.17.58.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:58:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ay26U6aj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113522-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CF77284A84 for ; Mon, 25 Mar 2024 00:56:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4474C13DDC3; Sun, 24 Mar 2024 22:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ay26U6aj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E05013DDA5; Sun, 24 Mar 2024 22:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320324; cv=none; b=n8QQMMJwV7VZX+xExvcqwYg1XYF+b8rOAk3afPcR1zIlFxDGrPHDcPJ1KChfuQhQBjmVJL19mkwHWbnK7PUcfyfZrZO7El2oCUCck8IdzkpdfttO6BjGL3vCBe50ludaZQ1uswRlqmcQhC0hY+Z8A0HXrR9eGNy69y4uYQLgv7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320324; c=relaxed/simple; bh=EMIauOwNZpp1rnml5K+5PBZu7xOF1ZXp6XWVN1UwmcM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pw6jej9ZzhrzHnjcknsx/NQCZlO/vYM48CTpvUPHFhvOcGknnPUjsEm+gU6cGVEluaTSDES+gZdVywlXGf+/THeo7GnInzZUkM9nhz1/7dvB1J6h4B3qf8FRZapH292sZbErem0swZYeWf/fN5uPxhUwyPd9Qf9ABuisVltGyio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ay26U6aj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4883BC433F1; Sun, 24 Mar 2024 22:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320324; bh=EMIauOwNZpp1rnml5K+5PBZu7xOF1ZXp6XWVN1UwmcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ay26U6aj3OlyjI/P3sVQV079KL38UxJLGoXOpHdR3fzPjJZizJAgohgZZnyqpgWaH kd7GDWU9/IjnKkPHjljpEIbMRUd3hopFPFX+UL8F68WKQ40iSF0DIhYZ+DswfEEezY xT1/n7jSfqeu3R78TstlwIz8cWDyL6s5nikL33YW1FpCJSlTIwqzPYAtSqS76FSLdo ketkVanliofoSra1pXn+BnRMPGq1u94TXMMSGbV9hRM6N8uesNiNZZmU2awzXE+AgR UGwacFbuu7EHs2rtnL5GCdSgS22NTBBUb5xdJAXUMbsQ0SFWGIT9MqShGfK8hlP7od tK2CH2ZI4sbVw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sakari Ailus , Wentong Wu , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH 6.8 631/715] mei: vsc: Call wake_up() in the threaded IRQ handler Date: Sun, 24 Mar 2024 18:33:30 -0400 Message-ID: <20240324223455.1342824-632-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Sakari Ailus [ Upstream commit 058a38acba15fd8e7b262ec6e17c4204cb15f984 ] The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken. wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads to sleeping in atomic context. Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr() where it can be safely called. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Signed-off-by: Sakari Ailus Tested-and-Reviewed-by: Wentong Wu Link: https://lore.kernel.org/r/20240219195807.517742-2-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/mei/vsc-tp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c index 55f7db490d3bb..0e623700c3b0e 100644 --- a/drivers/misc/mei/vsc-tp.c +++ b/drivers/misc/mei/vsc-tp.c @@ -416,8 +416,6 @@ static irqreturn_t vsc_tp_isr(int irq, void *data) atomic_inc(&tp->assert_cnt); - wake_up(&tp->xfer_wait); - return IRQ_WAKE_THREAD; } @@ -425,6 +423,8 @@ static irqreturn_t vsc_tp_thread_isr(int irq, void *data) { struct vsc_tp *tp = data; + wake_up(&tp->xfer_wait); + if (tp->event_notify) tp->event_notify(tp->event_notify_context); -- 2.43.0