Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp730710pxb; Thu, 2 Sep 2021 13:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ5yNAFRPNQF87ivPYwunmaFgFTGp7heVe97gKL74J3aD1PJuIyszBEPAJPUGxDRAEMxIu X-Received: by 2002:a17:906:369a:: with SMTP id a26mr55986ejc.539.1630615730929; Thu, 02 Sep 2021 13:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630615730; cv=none; d=google.com; s=arc-20160816; b=YRVeTNlz9GevJYpKjg3OgfucXEhFAU2l0YYGBrUUp40XMkogRPaae7cqPDsJTTMD1X S3hzTMLIPVqR0tvhdWtutf41Sd9zqywhC2GhWVSgC/EaA+Ba3UhgXdPu4GfaaIZq10Rn NZmpR2iITt1TV3rUCIqMCD0654TKOK1fydsjbH/EfTmRziycJS0tXAihZmx4GWqeWoy3 mVdQ8dZPbYg2mtaO3tWlYrJ1CiBIYMAGV6jgpZQk4ea5OPmvCj9MdRlHP0MrdOlQcBvk PDTMrvpF3Uk5g4C3Fg+cBXBIoK61vYJZ8adbbB7mAMyED4Op1AWATdaij5BiJBTXCaHT Yq6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=59fVHMh8PY26NZeW/ZL2PrtVCJSqfW31agFDv61GeFc=; b=Dl5aJN2irbJ28ywKHpUkX+26U8ZPan2eCUKAyQ1T8TMAu/7udXQo9S0KQ8VEwWUQcP 38P7SOWYn/otDCeCvilxna6HPkjNMA7y5iZwRcSBlwI4mVebBZsB0+cZUf4tPIU4ntmA fbWefrgg/OgRrM3b6Zu8VODUU02m9cCs38RiZy0ykhMRjxOZEuEl5pKAAZoQ1U4oooS1 604VehUbDWpclGZxwYMsohWrAHcw+XfblNQgemj4wCcTkarOBbW1P+HPXDpdx4BPI2yP mj4vBw7g/uljEW7sS6Ul37bx08WiCRkqv/t7uB3zMM4iHVM7bfGcsqCTiKU+AeYBIaXM evtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rI4GcK8U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si2782776ejj.387.2021.09.02.13.48.17; Thu, 02 Sep 2021 13:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rI4GcK8U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346344AbhIBU1f (ORCPT + 99 others); Thu, 2 Sep 2021 16:27:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:53902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346288AbhIBU1d (ORCPT ); Thu, 2 Sep 2021 16:27:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 396AB60FC0; Thu, 2 Sep 2021 20:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630614395; bh=X4Mka5AcwZPbW6lUjbBwstma++xkUw/YNn+ixtg3Mho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=rI4GcK8UBY+J/MG4ZRXG2CQqhwkvxxqlcxqBAxuCT1PhMcjIonW1FUQu3uurQnTcV b3M599haVZ6Gqb+cKiUmDVKtiNplYapRKEZ6Px1Kg4wswIkGr6HKg0O/E4yMirCmQk ggbD+Eensdk3OHpDLvT1qU6Srt1veZ0qG4esPScTdLJksyDbmL2lIrzj3cD9QH7cUM 010rLmJJyIgJCBJCITvS1pNoJfa9GFzWEkjGcwjTUkiaPlgpJ0ySE+/y1q9uqlfXRr zbWyVgrZlNxGu8vPFTWljyBfU6pQZHpka5I4xel/b5ez5VCAgJEFDffQSR5LvCBXZy AUFhC3VGh0vcw== From: zanussi@kernel.org To: LKML , linux-rt-users , Steven Rostedt , Thomas Gleixner , Carsten Emde , John Kacur , Sebastian Andrzej Siewior , Daniel Wagner , Clark Williams , "Luis Claudio R. Goncalves" , Tom Zanussi Cc: Andrew Halaney Subject: [PATCH RT 1/2] locking/rwsem-rt: Remove might_sleep() in __up_read() Date: Thu, 2 Sep 2021 15:26:30 -0500 Message-Id: <215c9e668bc1b637529e877fedfc7dc6c54c4ca0.1630614380.git.zanussi@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Halaney v5.4.143-rt64-rc1 stable review patch. If anyone has any objections, please let me know. ----------- [ Upstream commit b2ed0a4302faf2bb09e97529dd274233c082689b ] There's no chance of sleeping here, the reader is giving up the lock and possibly waking up the writer who is waiting on it. Reported-by: Chunyu Hu Signed-off-by: Andrew Halaney Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Tom Zanussi --- kernel/locking/rwsem-rt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/locking/rwsem-rt.c b/kernel/locking/rwsem-rt.c index 19ea20be3fd7..966946454ced 100644 --- a/kernel/locking/rwsem-rt.c +++ b/kernel/locking/rwsem-rt.c @@ -200,7 +200,6 @@ void __up_read(struct rw_semaphore *sem) if (!atomic_dec_and_test(&sem->readers)) return; - might_sleep(); raw_spin_lock_irq(&m->wait_lock); /* * Wake the writer, i.e. the rtmutex owner. It might release the -- 2.17.1