Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1601323

Re: crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex

From Sowmini Varadhan <sowmini.varadhan@oracle.com>
Newsgroups linux.kernel
Subject Re: crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex
Date 2017-03-15 12:40 +0100
Message-ID <tlfrA-6ZQ-31@gated-at.bofh.it> (permalink)
References (1 earlier) <thIsa-3HM-19@gated-at.bofh.it> <thXrc-6fC-29@gated-at.bofh.it> <tkPQt-5JY-1@gated-at.bofh.it> <tkWyC-20n-25@gated-at.bofh.it> <tld6r-5vn-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (03/15/17 10:08), Dmitry Vyukov wrote:
> After I've applied the patch these reports stopped to happen, and I
> have not seem any other reports that look relevant.
> However, it there was one, but it looks like a different issue and it
> was probably masked by massive amounts of original deadlock reports:

Yes, this looks like a valid deadlock.

I think there may be some ->dumpit callbacks that take the rtnl_lock
and do not unlock it before return, e.g., I see nl80211_dump_interface()
doing this at 

   2612         rtnl_lock();
   2613         if (!cb->args[2]) {
     :
   2619                 ret = nl80211_dump_wiphy_parse(skb, cb, &state);
   2620                 if (ret)
   2621                         return ret;

afaict, nl80211_dump_wiphy_parse does not itself do rtnl_unlock on error.


If that's the case then we'd run into the circular locking dependancy
flagged by lockdep. 

Disclaimer: I did not check every single ->dumpit, there may be more
than one of these..

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2017-03-14 16:30 +0100
  Re: crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex Dmitry Vyukov <dvyukov@google.com> - 2017-03-15 10:10 +0100
    Re: crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2017-03-15 12:40 +0100

csiph-web