From: Patrick McHardy <kaber@trash.net>
To: "홍신 shin hong" <hongshin@gmail.com>
Cc: netfilter-devel@vger.kernel.org,
Wensong Zhang <wensong@linux-vs.org>, Horms <horms@verge.net.au>
Subject: Re: [bug?] netfilter/ipvs : suspected race bugs related to atomic operations
Date: Thu, 13 Aug 2009 15:44:27 +0200 [thread overview]
Message-ID: <4A8418BB.4060100@trash.net> (raw)
In-Reply-To: <2014bcab0908120743w2d96c359t818729b64c9da62b@mail.gmail.com>
홍신 shin hong wrote:
> Hi. I am reporting two suspected race bug related to atomic operations
> while I read net/netfilter/ipvs of Linux 2.6.30.4.
>
> (1) In net/netfilter/ipvs/ip_vs_core.c, ip_vs_in() first increments &cp->in_pkts
> and then reads variable for condition checking at line 1346-1351.
>
> However, these two atomic operations may not be executed atomically.
> For this reason, it may result race with other concurrent executions
> which manipulates &cp->in_pkts.
>
> (2) In net/netfilter/ipvs/ip_vs_wrr.c, ip_vs_wrr_max_weight() first
> checks &dest->weight
> and then reads the variable again to assign its value to a local variable.
> For the similar reason above, it seems that two atomic_read() operations
> may result different values so that it may result race condition.
>
> Please examine the code and let me know your opinion. Thanks.
I'm not sure whether the IPVS guys are following the netfilter-devel
list, so I've CCed Wensong and Simon.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-08-13 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 14:43 [bug?] netfilter/ipvs : suspected race bugs related to atomic operations 홍신 shin hong
2009-08-13 13:44 ` Patrick McHardy [this message]
2009-08-13 22:43 ` Simon Horman
2009-08-13 22:56 ` Simon Horman
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=4A8418BB.4060100@trash.net \
--to=kaber@trash.net \
--cc=hongshin@gmail.com \
--cc=horms@verge.net.au \
--cc=netfilter-devel@vger.kernel.org \
--cc=wensong@linux-vs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.