Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3869878pxb; Tue, 7 Sep 2021 09:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPASa7gdTgDPRuF6+ywLE9OorO1095f6uGHVgFzY+em4hlfHhyt5JPkhvuiEHlpyHjSg6J X-Received: by 2002:a05:6402:2801:: with SMTP id h1mr230285ede.209.1631031378722; Tue, 07 Sep 2021 09:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631031378; cv=none; d=google.com; s=arc-20160816; b=Q7MDozxZR2fBISGPkM0KOKjkwsgelDjuhEGtRDVavwE/LjkMro5X0DUb3mawdPjn1h sl+OW4TQXyCdZJzVlunkUGkhEYPZe/Yj3X+44jteSLFRrJEQdCne1r6/BqeFHWVxDZsC Pb91/+k0ICLm36EMHB1BXup3ufYp7DI1ewZSiXK7/zZnVNtk6hhigSgb9XchzwdGIKO3 +C4s9x76aO6uaQbr6jwZf1EFrqrkNo34WOLRtPwa6y6ANIrFA/6Lm234sbJPm+VrBAzG r74zLIsXKdSkZQ7pePksrmfJ+BJQzG6d/nTIIMR/OwC3DO3awLOek9Dq0FYjtDjr2hzQ mNxw== 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=eJ7KUVKRpb3NGmgK2PyMtj19Rb3RoEj6Lc/vIY6GbjA=; b=fYYaP/RdXtD1KRN3f90odUWD3Jf2YDPZryGNReMfaVJAWyWWqrvOOLq7TF2Bg/E+F1 0G0/jOAsdKvKXtJafXzwnCZK7X3g8A8q3qUJQsgR7C4Bsg8J7PCbMyq6p820QFd6w1w7 dfpZZZs/kjtWypf6oVxqMs0C1BT7DkA8WKHAb2OqAreZyhfLoQhglqrEl4vn1rvTUOTF CmqbjuMVWDYyiG4pD48rfKwulxcKG7d823q4l6WGuMp9toTvUBoD2yFfFTs2zC9xjvqe CvAYOLwOsBIzT36gWymaoYZ5JZ5ohS0ccGCo8CxRW9aqCFBQMaTC2GuVyJAuFA0o1ZSu OYDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="dL/ThkFh"; 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 d13si8238009ejo.254.2021.09.07.09.15.49; Tue, 07 Sep 2021 09:16:18 -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="dL/ThkFh"; 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 S1345072AbhIGPQk (ORCPT + 99 others); Tue, 7 Sep 2021 11:16:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:42896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345061AbhIGPQi (ORCPT ); Tue, 7 Sep 2021 11:16:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CB8C6112E; Tue, 7 Sep 2021 15:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631027732; bh=KvtCf6stqLiEbq7sySSQ86RmRGkW8yQj4rPuQwmzu+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=dL/ThkFhUhJ3Zsr4RbgRl+utBczBn/aXJK2OUdKeyehk05tb5tNl36zcWz2g41c7Q eX/OdvsACvZKzZkDzLR+axdyiIJZg3ekm5gC1O04d1sZWlnNalNxCHnDQo4pfg6pJF u42eqPlxTvW6QNMyJ1vaeLmz106BTjy0QOUdB/cUmM/Da4dpoN93PO/XEio4kCZC3B Z4oYD6N3K9dDzDAXYKFOACpWxb2sk1WFt4C+qUh4S6LVQTtMsPIsAOC/hPRQpumkS4 88Su9ZXGaXysp/tH0uLKad1IFaqGdp2uKOLcEkaYeIUJ5bGtngsGo6aHZgVmrFMd6r zuIDRu978cuvQ== 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/3] locking/rwsem-rt: Remove might_sleep() in __up_read() Date: Tue, 7 Sep 2021 10:15:27 -0500 Message-Id: <863d8c29a4b1b1500f7a90557af8b7fa442afcb7.1631027711.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-rc2 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