archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <>
To: Jason Gunthorpe <>
Cc:, Hillf Danton <>,
Subject: Re: [PATCH] RDMA/core: Fix bogus WARN_ON during ib_unregister_device_queued()
Date: Sun, 28 Jun 2020 11:02:02 +0300	[thread overview]
Message-ID: <20200628080202.GB6281@unreal> (raw)
In-Reply-To: <>

On Fri, Jun 26, 2020 at 02:49:10PM -0300, Jason Gunthorpe wrote:
> ib_unregister_device_queued() can only be used by drivers using the new
> dealloc_device callback flow, and it has a safety WARN_ON to ensure
> drivers are using it properly.
> However, if unregister and register are raced there is a special
> destruction path that maintains the uniform error h andling semantic of

"h andling" -> "handling"

> 'caller does ib_dealloc_device() on failure'. This requires disabling the
> dealloc_device callback which triggers the WARN_ON.
> Instead of using NULL to disable the callback use a special function
> pointer so the WARN_ON does not trigger.
> Reported-by:
> Suggested-by: Hillf Danton <>
> Signed-off-by: Jason Gunthorpe <>
> ---
>  drivers/infiniband/core/device.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

Reviewed-by: Leon Romanovsky <>

  reply	other threads:[~2020-06-28  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 17:49 Jason Gunthorpe
2020-06-28  8:02 ` Leon Romanovsky [this message]
2020-07-02 17:29 ` Jason Gunthorpe

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200628080202.GB6281@unreal \ \ \ \ \ \
    --subject='Re: [PATCH] RDMA/core: Fix bogus WARN_ON during ib_unregister_device_queued()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).