linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Ilya Andronov <ilyaandronov1983@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: librdmacm infinite loop in rpoll when timeout > 0
Date: Sun, 21 Sep 2025 15:17:15 +0300	[thread overview]
Message-ID: <20250921121715.GJ10800@unreal> (raw)
In-Reply-To: <CAA9MXNTgdRCg0te=jzEontuLAdbTnfjr7o3cf6en4a=wYJs-Qg@mail.gmail.com>

How did you come to this conclusion?

Thanks

On Sat, Sep 20, 2025 at 11:33:32AM +0300, Ilya Andronov wrote:
> index 005bd0be8..32fb30aea 100644
> --- a/librdmacm/rsocket.c
> +++ b/librdmacm/rsocket.c
> @@ -3362,9 +3362,6 @@ int rpoll(struct pollfd *fds, nfds_t nfds, int timeout)
>                 if (ret)
>                         break;
> 
> -               if (rs_poll_enter())
> -                       continue;
> -
>                 if (timeout >= 0) {
>                         timeout -= (int) ((rs_time_us() - start_time) / 1000);
>                         if (timeout <= 0)
> @@ -3374,6 +3371,9 @@ int rpoll(struct pollfd *fds, nfds_t nfds, int timeout)
>                         pollsleep = wake_up_interval;
>                 }
> 
> +               if (rs_poll_enter())
> +                       continue;
> +
>                 ret = poll(rfds, nfds + 1, pollsleep);
>                 if (ret < 0) {
>                         rs_poll_exit();
> 

      reply	other threads:[~2025-09-21 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-20  8:33 librdmacm infinite loop in rpoll when timeout > 0 Ilya Andronov
2025-09-21 12:17 ` Leon Romanovsky [this message]

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=20250921121715.GJ10800@unreal \
    --to=leon@kernel.org \
    --cc=ilyaandronov1983@gmail.com \
    --cc=linux-rdma@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).