From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [RFC(v2) net-next 01/13] ndisc: Refer/Update neigh->updated with write lock.
Date: Wed, 16 Jan 2013 23:04:39 +0900 [thread overview]
Message-ID: <50F6B377.5000005@linux-ipv6.org> (raw)
In-Reply-To: <50F64A3C.9040605@gmail.com>
Cong Wang wrote:
> On 01/16/2013 12:44 AM, YOSHIFUJI Hideaki wrote:
>> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
>> ---
>> net/ipv6/route.c | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index 7c34c01..1341f68 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -499,22 +499,26 @@ static void rt6_probe(struct rt6_info *rt)
>> * to no more than one per minute.
>> */
>> neigh = rt ? rt->n : NULL;
>> - if (!neigh || (neigh->nud_state & NUD_VALID))
>> + if (!neigh)
>> + return;
>> + write_lock_bh(&neigh->lock);
>> + if (neigh->nud_state & NUD_VALID) {
>> + write_unlock_bh(&neigh->lock);
>> return;
>> - read_lock_bh(&neigh->lock);
>> + }
>> if (!(neigh->nud_state & NUD_VALID) &&
>> time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) {
>> struct in6_addr mcaddr;
>> struct in6_addr *target;
>>
>> neigh->updated = jiffies;
>> - read_unlock_bh(&neigh->lock);
>> + write_unlock_bh(&neigh->lock);
>
> This looks like a bug fix, which deserves a separated patch rather than
> in this rt->n removal series.
Because the series depends on this, it is included here so far.
--yoshfuji
prev parent reply other threads:[~2013-01-16 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 16:44 [RFC(v2) net-next 01/13] ndisc: Refer/Update neigh->updated with write lock YOSHIFUJI Hideaki
2013-01-16 6:35 ` Cong Wang
2013-01-16 14:04 ` YOSHIFUJI Hideaki [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=50F6B377.5000005@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/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).