netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: guru2018@gmail.com
Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH]ipv6: multicast: In mld_send_cr function moving read lock to second for loop
Date: Sat, 18 Aug 2018 13:58:19 -0700 (PDT)	[thread overview]
Message-ID: <20180818.135819.1279366350823380240.davem@davemloft.net> (raw)
In-Reply-To: <CAHSpA5-ivVaQnQU7_ikt=BV-EAwFJFaA6ErpQ1Jn1HmPmXZapg@mail.gmail.com>

From: Guruswamy Basavaiah <guru2018@gmail.com>
Date: Fri, 17 Aug 2018 18:01:41 +0530

> @@ -1860,7 +1860,6 @@ static void mld_send_cr(struct inet6_dev *idev)
>      struct sk_buff *skb = NULL;
>      int type, dtype;
> 
> -    read_lock_bh(&idev->lock);
>      spin_lock(&idev->mc_lock);
> 
>      /* deleted MCA's */

This will lead to deadlocks, idev->mc_lock must be taken with _bh().

I have zero confidence in this change, did you do any stress testing
with lockdep enabled?  It would have caught this quickly.

  reply	other threads:[~2018-08-19  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHSpA58KdjMLnnGdbyDbASJLFuf2BHLsADBuO1jeT_1uFp9GUA@mail.gmail.com>
2018-08-17 12:31 ` [PATCH]ipv6: multicast: In mld_send_cr function moving read lock to second for loop Guruswamy Basavaiah
2018-08-18 20:58   ` David Miller [this message]
2018-09-18 13:21     ` Guruswamy Basavaiah

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=20180818.135819.1279366350823380240.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=guru2018@gmail.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).