From: Laszlo Attila Toth <panther@balabit.hu>
To: Jarek Poplawski <jarkao2@o2.pl>
Cc: David Miller <davem@davemloft.net>,
Patrick McHardy <kaber@trash.net>,
netdev@vger.kernel.org
Subject: Re: [PATCHv7 1/5] Remove unnecessary locks from rtnetlink (in do_setlink)
Date: Mon, 03 Dec 2007 12:59:31 +0100 [thread overview]
Message-ID: <4753EFA3.9020309@balabit.hu> (raw)
In-Reply-To: <47508AF0.7070204@o2.pl>
Jarek Poplawski írta:
> Laszlo Attila Toth wrote, On 11/29/2007 05:11 PM:
>
>> The do_setlink function is protected by rtnl, additional locks are unnecessary,
>> and the set_operstate() function is called from protected parts. Locks removed
>> from both functions.
>
> It doesn't look like in accordance with a comment to dev_base_lock in dev.c.
> And it makes eg. rfc2863_policy() locking from link_watch.c looking strange.
> Isn't there needed some additional comment to this?
I modified do_setlink(), but set_operstate() is also called from
rtnl_create_link() and from no other places. In rtnl_create_link() none
of the changes is protected by set_lock_bh() except inside
set_operstate(), different locking scheme is not necessary for the
operstate.
Also two solution can be made, one is locking everything and one is
locking nothing (to unify the changes made by these parts). The second
one is better if it is protected.
I tried to figure out how it is protected but I couldn't. But Patrick
said it is protected by rtnl. And he suggested this patch.
Attila
next prev parent reply other threads:[~2007-12-03 11:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ifgroup-20071129-165736-1196351856-panther@balabit.hu>
2007-11-29 16:11 ` [PATCHv7 0/5 + 3] Interface group patches Laszlo Attila Toth
2007-11-29 16:25 ` Patrick McHardy
2007-11-29 16:39 ` Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 1/5] Remove unnecessary locks from rtnetlink (in do_setlink) Laszlo Attila Toth
2007-11-30 22:13 ` Jarek Poplawski
2007-12-03 11:59 ` Laszlo Attila Toth [this message]
2007-12-18 12:29 ` [PATCHv7 1/5][RESEND] Remove unnecessary locks from rtnetlink Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 2/5] rtnetlink: send a single notification on device state changes Laszlo Attila Toth
2007-11-30 23:24 ` Jarek Poplawski
2007-12-03 11:40 ` Laszlo Attila Toth
2007-12-03 13:37 ` Jarek Poplawski
2007-12-18 12:29 ` [PATCHv7 2/5][RESEND] " Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 3/5] Interface group: core (netlink) part Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 4/5] Ifgroup read/write support in sysfs Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 5/5] Netfilter Interface group match Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 iptables] " Laszlo Attila Toth
2007-12-01 21:19 ` Jarek Poplawski
2007-12-01 21:23 ` Jarek Poplawski
2007-11-29 16:11 ` [PATCHv7 iproute2 1/2] Added IFLA_NET_NS_PID as in kernel v2.6.24-rc1 Laszlo Attila Toth
2007-11-29 16:11 ` [PATCHv7 iproute2 2/2] Interface group as new ip link option Laszlo Attila Toth
2007-12-01 22:10 ` Jarek Poplawski
2007-12-18 12:29 ` [PATCHv7 iproute2 2/2][RESEND] " Laszlo Attila Toth
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=4753EFA3.9020309@balabit.hu \
--to=panther@balabit.hu \
--cc=davem@davemloft.net \
--cc=jarkao2@o2.pl \
--cc=kaber@trash.net \
--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).