netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 2/3] Lost locking in fl6_sock_lookup
Date: Thu, 18 Oct 2007 16:11:58 +0400	[thread overview]
Message-ID: <47174D8E.2050200@openvz.org> (raw)
In-Reply-To: <20071018.210043.51908349.yoshfuji@linux-ipv6.org>

YOSHIFUJI Hideaki wrote:
> In article <47174950.6060409@openvz.org> (at Thu, 18 Oct 2007 15:53:52 +0400), Pavel Emelyanov <xemul@openvz.org> says:
> 
>> This routine scans the ipv6_fl_list whose update is
>> protected with the socket lock and the ip6_sk_fl_lock.
> 
>>  		struct ip6_flowlabel *fl = sfl->fl;
>>  		if (fl->label == label) {
>> +			read_unlock_bh(&ip6_sk_fl_lock);
>>  			fl->lastuse = jiffies;
>>  			atomic_inc(&fl->users);
>>  			return fl;
> 
> We should increment fl->users within the critical section, shouldn't we?

Not necessary. The users is more than zero (because it is 
linked in the sock's list) so garbage collector won't catch 
it in any way.

Thanks,
Pavel

> --yoshfuji
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2007-10-18 12:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 11:53 [PATCH 2/3] Lost locking in fl6_sock_lookup Pavel Emelyanov
2007-10-18 12:00 ` YOSHIFUJI Hideaki / 吉藤英明
2007-10-18 12:11   ` Pavel Emelyanov [this message]
2007-10-18 12:14     ` David Miller
2007-10-18 12:16 ` David Miller
2007-10-18 12:22   ` Pavel Emelyanov
2007-10-18 12:33     ` David Miller

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=47174D8E.2050200@openvz.org \
    --to=xemul@openvz.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --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).