From: Andrew Halaney <ahalaney@redhat.com>
To: bigeasy@linutronix.de
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
Chunyu Hu <chuhu@redhat.com>
Subject: Re: [RT PATCH] locking/rwsem-rt: Remove might_sleep() in __up_read()
Date: Mon, 26 Apr 2021 11:42:29 -0500 [thread overview]
Message-ID: <20210426164229.mbrsrjpmmhp7ehna@halaneylaptop> (raw)
In-Reply-To: <20210406221952.50399-1-ahalaney@redhat.com>
On Tue, Apr 06, 2021 at 05:19:52PM -0500, Andrew Halaney wrote:
> 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 <chuhu@redhat.com>
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
> Hello,
>
> I ran into a warning caused by this, and I think the warning is
> incorrect. Please let me know if I'm wrong!
> I'm working off of linux-5.12.y-rt, but this applies cleanly to older
> stable branches as well.
>
> Thanks,
> Andrew
>
> 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 274172d5bb3a..b61edc4dcb73 100644
> --- a/kernel/locking/rwsem-rt.c
> +++ b/kernel/locking/rwsem-rt.c
> @@ -198,7 +198,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.30.2
>
Just a gentle follow up, any feedback?
Thanks,
Andrew
next prev parent reply other threads:[~2021-04-26 16:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 22:19 [RT PATCH] locking/rwsem-rt: Remove might_sleep() in __up_read() Andrew Halaney
2021-04-26 16:42 ` Andrew Halaney [this message]
2021-04-26 18:16 ` Thomas Gleixner
2021-07-08 19:51 ` Andrew Halaney
2021-07-09 13:48 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210426164229.mbrsrjpmmhp7ehna@halaneylaptop \
--to=ahalaney@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=chuhu@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).