public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] IB/core: Add might_sleep() annotation to ib_init_ah_from_wc()
Date: Wed, 30 Aug 2017 10:24:03 -0400	[thread overview]
Message-ID: <571534e2-878c-b169-e65c-d4dd2d05694f@redhat.com> (raw)
In-Reply-To: <20170829173444.4289-2-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 954 bytes --]

On 8/29/2017 1:34 PM, Roland Dreier wrote:
> From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
> 
> For RoCE, ib_init_ah_from_wc() can follow the path
> 
>     ib_init_ah_from_wc() ->
>       rdma_addr_find_l2_eth_by_grh() ->
>         rdma_resolve_ip()
> 
> and rdma_resolve_ip() will sleep in kzalloc() and wait_for_completion().
> 
> However, developers will not see any warnings if they use ib_init_ah_from_wc()
> in an atomic context and test only on IB, because the function doesn't
> sleep in that case.
> 
> Add a might_sleep() so that lockdep will catch bugs no matter what hardware is
> used to test.
> 
> Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>

Thanks, will pick this up today too.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

  parent reply	other threads:[~2017-08-30 14:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 17:34 [PATCH 1/2] IB/cm: Fix sleeping in atomic when RoCE is used Roland Dreier
     [not found] ` <20170829173444.4289-1-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-29 17:34   ` [PATCH 2/2] IB/core: Add might_sleep() annotation to ib_init_ah_from_wc() Roland Dreier
     [not found]     ` <20170829173444.4289-2-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-30 14:24       ` Doug Ledford [this message]
2017-08-29 18:37   ` [PATCH 1/2] IB/cm: Fix sleeping in atomic when RoCE is used Hefty, Sean
2017-08-30 14:23   ` Doug Ledford

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=571534e2-878c-b169-e65c-d4dd2d05694f@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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