Re: [PATCH 2/2] IB/core: Add might_sleep() annotation to ib_init_ah_from_wc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/29/2017 1:34 PM, Roland Dreier wrote:
> From: Roland Dreier <roland@xxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxx>

Thanks, will pick this up today too.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG Key ID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux