From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Steve Wise
<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
'Potnuri Bharat Teja'
<bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH for-next] iw_cxgb4: Fix possible circular dependency locking warning
Date: Mon, 13 Nov 2017 16:59:39 -0500 [thread overview]
Message-ID: <1510610379.3735.44.camel@redhat.com> (raw)
In-Reply-To: <012b01d35969$48d7d9a0$da878ce0$@opengridcomputing.com>
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]
On Thu, 2017-11-09 at 08:44 -0600, Steve Wise wrote:
> >
> > Locking sequence of iw_cxgb4 and RoCE drivers in ib_register_device() is
> > slightly different and this leads to possible circular dependency locking
> > warning when both the devices are brought up.
> >
> > Here is the locking sequence upto ib_register_device():
> > iw_cxgb4: rtnl_mutex(net stack) --> uld_mutex --> device_mutex
> > RoCE drivers: device_mutex --> rtnl_mutex
> >
> > Here is the possibility of cross locking:
> >
> > CPU #0 (iw_cxgb4) CPU #1 (RoCE drivers)
> >
> > -> on interface up cxgb4_up()
> > executed with rtnl_mutex held
> > -> hold uld_mutex and try
> > registering ib device
> > -> In ib_register_device() hold
> > device_mutex
> > -> hold device mutex in
> > ib_register_device
> > -> try acquiring rtnl_mutex in
> > ib_enum_roce_netdev()
> >
> > Current patch schedules the ib_register_device() functionality of
> > iw_cxgb4 to a workqueue to prevent the possible cross-locking.
> > Also rename the labels in c4iw_reister_device().
> >
> > Signed-off-by: Potnuri Bharat Teja <bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
>
> Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
>
>
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-13 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 12:17 [PATCH for-next] iw_cxgb4: Fix possible circular dependency locking warning Potnuri Bharat Teja
[not found] ` <1510229853-25875-1-git-send-email-bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2017-11-09 14:44 ` Steve Wise
2017-11-13 21:59 ` Doug Ledford [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-09 11:27 Chelsio Cudbg
[not found] ` <1510226844-4165-1-git-send-email-chelsiocudbg-KJX8L1YACloTKYOLMXNBRxrm3jAUxWOA@public.gmane.org>
2017-11-09 11:36 ` Potnuri Bharat Teja
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=1510610379.3735.44.camel@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.