netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: marcelo.leitner@gmail.com
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org
Subject: Re: [PATCH 1/3] ipv4,ipv6: grab rtnl before locking the socket
Date: Wed, 18 Mar 2015 22:05:25 -0400 (EDT)	[thread overview]
Message-ID: <20150318.220525.1402514310956071469.davem@davemloft.net> (raw)
In-Reply-To: <9605dd2faf9e0aae8c3f6ce9f255760dd4856c91.1426700794.git.marcelo.leitner@gmail.com>

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Wed, 18 Mar 2015 14:50:42 -0300

> There are some setsockopt operations in ipv4 and ipv6 that are grabbing
> rtnl after having grabbed the socket lock. Yet this makes it impossible
> to do operations that have to lock the socket when already within a rtnl
> protected scope, like ndo dev_open and dev_stop.
> 
> We normally take coarse grained locks first but setsockopt inverted that.
> 
> So this patch invert the lock logic for these operations and makes
> setsockopt grab rtnl if it will be needed prior to grabbing socket lock.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Applied to net-next.

      parent reply	other threads:[~2015-03-19  2:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 17:50 [PATCH 1/3] ipv4,ipv6: grab rtnl before locking the socket Marcelo Ricardo Leitner
2015-03-18 17:50 ` [PATCH 2/3] ipv4,ipv6: kill ip_mc_{join,leave}_group and ipv6_sock_mc_{join,drop} Marcelo Ricardo Leitner
2015-03-19  2:05   ` David Miller
2015-03-18 17:50 ` [PATCH 3/3] vxlan: Move socket initialization to within rtnl scope Marcelo Ricardo Leitner
2015-03-19  2:05   ` David Miller
2015-03-19  2:05 ` David Miller [this message]

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=20150318.220525.1402514310956071469.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.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).