From: Patrick McHardy <kaber@trash•net>
To: Simon Horman <horms@verge•net.au>
Cc: lvs-devel@vger•kernel.org, netdev@vger•kernel.org,
netfilter-devel@vger•kernel.org,
"홍신 shin hong" <hongshin@gmail•com>,
"David Miller" <davem@davemloft•net>
Subject: Re: [patch] ipvs: Use atomic operations atomicly
Date: Mon, 31 Aug 2009 14:22:26 +0200 [thread overview]
Message-ID: <4A9BC082.3090804@trash.net> (raw)
In-Reply-To: <20090828023722.GA12136@verge.net.au>
Simon Horman wrote:
> A pointed out by Shin Hong, IPVS doesn't always use atomic operations
> in an atomic manner. While this seems unlikely to be manifest in
> strange behaviour, it seems appropriate to clean this up.
>
> Cc: 홍신 shin hong <hongshin@gmail•com>
> Signed-off-by: Simon Horman <horms@verge•net.au>
Applied, thanks.
> if (af == AF_INET &&
> (ip_vs_sync_state & IP_VS_STATE_MASTER) &&
> (((cp->protocol != IPPROTO_TCP ||
> cp->state == IP_VS_TCP_S_ESTABLISHED) &&
> - (atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1]
> + (pkts % sysctl_ip_vs_sync_threshold[1]
It seems that proc_do_sync_threshold() should check whether this value
is zero. The current checks also look racy since incorrect values are
first updated, then overwritten again.
--
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-31 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 2:37 [patch] ipvs: Use atomic operations atomicly Simon Horman
2009-08-31 12:22 ` Patrick McHardy [this message]
2009-08-31 14:49 ` Simon Horman
2009-09-01 1:59 ` Simon Horman
2009-09-02 12:56 ` Patrick McHardy
2009-09-19 9:51 ` 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=4A9BC082.3090804@trash.net \
--to=kaber@trash$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=hongshin@gmail$(echo .)com \
--cc=horms@verge$(echo .)net.au \
--cc=lvs-devel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=netfilter-devel@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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