Re: [for-next PATCH 2/4] RDMA/bnxt_re: Refactor rdev init/uninit path and simplifying rtnl_lock usage

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

 



On Thu, Dec 06, 2018 at 10:49:44AM -0800, Selvin Xavier wrote:
> From: Somnath Kotur <somnath.kotur@xxxxxxxxxxxx>
> 
>  - Add more flags for better granularity in rdev init/uninit path.
>  - bnxt_re_ib_reg() handles two main functionalities - initializing
>    the device and registering with the IB stack.  Split it into 2
>    functions i.e. bnxt_re_dev_init() and bnxt_re_ib_init()  to account
>    for the same thereby improve modularity. Do the same for
>    bnxt_re_ib_unreg()i.e. split into two functions - bnxt_re_dev_uninit()
>    and  bnxt_re_ib_uninit().
>  - Since bnxt_re_dev_init() part of bnxt_re_ib_reg()
>    takes rtnl_lock inside for the entire function, so it is better to
>    invoke it from bnxt_netdev_event() itself where the rtnl_lock is held
>    already for  NETDEV_EVENT.

Drivers cannot hold rtnl_lock while calling ib_unregister_device() (or
really any lock, unless done carefully). Looks like bnxt does this
already and prehaps this patch makes it worse?

Jason




[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