netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Laszlo Attila Toth <panther@balabit.hu>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [IFGROUPv4 2/3] Interface group: core (netlink) part
Date: Thu, 25 Oct 2007 17:14:46 +0200	[thread overview]
Message-ID: <4720B2E6.1060505@trash.net> (raw)
In-Reply-To: <11933245921874-git-send-email-panther@balabit.hu>

Laszlo Attila Toth wrote:
> Interface groups let handle different interfaces together
> especially in netfilter modules.
> Modified net device structure and netlink interface.
> 
> @@ -891,6 +895,13 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
>  		}
>  	}
>  
> +	if (tb[IFLA_IFGROUP]) {
> +		write_lock_bh(&dev_base_lock);
> +		dev->ifgroup = nla_get_u32(tb[IFLA_IFGROUP]);
> +		write_unlock_bh(&dev_base_lock);
> +		modified = 1;
> +	}


The locking looks unnecessary, the rtnl should be enough.
I'm not even sure why its used for operstate and linkmode,
AFAICS they are also protected by the rtnl.

  parent reply	other threads:[~2007-10-25 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 15:03 [IFGROUPv4 0/3 (+3)] Interface group patches Laszlo Attila Toth
2007-10-25 15:03 ` [IFGROUPv4 1/3] rtnetlink: setlink changes atomic with single notification Laszlo Attila Toth
2007-10-25 15:03   ` [IFGROUPv4 2/3] Interface group: core (netlink) part Laszlo Attila Toth
2007-10-25 15:03     ` [IFGROUPv4 3/3] Netfilter Interface group match Laszlo Attila Toth
2007-10-25 15:03       ` [IFGROUPv4 iptables] " Laszlo Attila Toth
2007-10-25 15:03         ` [IFGROUPv4 iproute 1/2] Added IFLA_NET_NS_PID as in kernel v2.6.24-rc1 Laszlo Attila Toth
2007-10-25 15:03           ` [IFGROUPv4 iproute 2/2] Interface group as new ip link option Laszlo Attila Toth
2007-10-25 15:25         ` [IFGROUPv4 iptables] Interface group match Patrick McHardy
2007-10-25 15:18       ` [IFGROUPv4 3/3] Netfilter " Patrick McHardy
2007-10-25 15:14     ` Patrick McHardy [this message]
2007-10-25 15:31       ` [IFGROUPv4 2/3] Interface group: core (netlink) part Laszlo Attila Toth
2007-10-25 15:40         ` Patrick McHardy

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=4720B2E6.1060505@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=panther@balabit.hu \
    /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).