From: Greg KH <gregkh@linuxfoundation.org>
To: Lee Jones <lee@kernel.org>
Cc: Tung Nguyen <tung.q.nguyen@dektech.com.au>,
stable@vger.kernel.org, davem@davemloft.net,
netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net
Subject: Re: [STABLE REQUEST] tipc: improve function tipc_wait_for_cond()
Date: Tue, 14 Mar 2023 18:57:54 +0100 [thread overview]
Message-ID: <ZBC1opyrsZkYb3Gb@kroah.com> (raw)
In-Reply-To: <20230314174537.GA1642994@google.com>
On Tue, Mar 14, 2023 at 05:45:37PM +0000, Lee Jones wrote:
> Dear Stable,
>
> > Commit 844cf763fba6 ("tipc: make macro tipc_wait_for_cond() smp safe")
> > replaced finish_wait() with remove_wait_queue() but still used
> > prepare_to_wait(). This causes unnecessary conditional
> > checking before adding to wait queue in prepare_to_wait().
> >
> > This commit replaces prepare_to_wait() with add_wait_queue()
> > as the pair function with remove_wait_queue().
> >
> > Acked-by: Ying Xue <ying.xue@windriver.com>
> > Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> > Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
> > ---
> > net/tipc/socket.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> > index 1217c90a363b..81b87916a0eb 100644
> > --- a/net/tipc/socket.c
> > +++ b/net/tipc/socket.c
> > @@ -388,7 +388,7 @@ static int tipc_sk_sock_err(struct socket *sock, long *timeout)
> > rc_ = tipc_sk_sock_err((sock_), timeo_); \
> > if (rc_) \
> > break; \
> > - prepare_to_wait(sk_sleep(sk_), &wait_, TASK_INTERRUPTIBLE); \
> > + add_wait_queue(sk_sleep(sk_), &wait_); \
> > release_sock(sk_); \
> > *(timeo_) = wait_woken(&wait_, TASK_INTERRUPTIBLE, *(timeo_)); \
> > sched_annotate_sleep(); \
>
> Could we have this ol' classic backported to v4.19 and v4.14 please?
What is the git commit id?
next prev parent reply other threads:[~2023-03-14 17:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 4:20 [tipc-discussion][net 0/2] improvement for wait and wakeup Tung Nguyen
2019-02-19 4:20 ` [tipc-discussion][net 1/2] tipc: improve function tipc_wait_for_cond() Tung Nguyen
2023-03-14 17:45 ` [STABLE REQUEST] " Lee Jones
2023-03-14 17:57 ` Greg KH [this message]
2023-03-14 18:04 ` Lee Jones
2023-03-15 7:24 ` Greg KH
2019-02-19 4:20 ` [tipc-discussion][net 2/2] tipc: improve function tipc_wait_for_rcvmsg() Tung Nguyen
2019-02-21 21:58 ` [tipc-discussion][net 0/2] improvement for wait and wakeup David Miller
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=ZBC1opyrsZkYb3Gb@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=lee@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.q.nguyen@dektech.com.au \
/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).