[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090521.152236.101174595.davem@davemloft.net>
Date: Thu, 21 May 2009 15:22:36 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jpirko@...hat.com
Cc: menage@...gle.com, lizf@...fujitsu.com, akpm@...ux-foundation.org,
tgraf@...g.ch, linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] cls_cgroup: read classid atomically in classifier
From: Jiri Pirko <jpirko@...hat.com>
Date: Thu, 21 May 2009 21:44:48 +0200
> Thu, May 21, 2009 at 08:31:26PM CEST, menage@...gle.com wrote:
>>cls_cgroup: read classid atomically in classifier
>>
>>Avoid reading the unsynchronized value cs->classid multiple times,
>>since it could change concurrently from non-zero to zero; this would
>>result in the classifier returning a positive result with a bogus
>>(zero) classid.
>>
>>Signed-off-by: Paul Menage <menage@...gle.com>
>>Reviewed-by: Li Zefan <lizf@...fujitsu.com>
>>
>>---
>>
>>Resending to cc netdev@...r.kernel.org as requested by DaveM
>>
>> net/sched/cls_cgroup.c | 22 +++++++++++-----------
>> 1 files changed, 11 insertions(+), 11 deletions(-)
>>
>>diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
>>index 1ab4542..4ece6e0 100644
>>--- a/net/sched/cls_cgroup.c
>>+++ b/net/sched/cls_cgroup.c
>>@@ -98,8 +98,7 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp,
>> struct tcf_result *res)
>> {
>> struct cls_cgroup_head *head = tp->root;
>>- struct cgroup_cls_state *cs;
>>- int ret = 0;
>>+ u32 classid;
> ^^^^^^^^ How about using TAB instead?
Agreed, please use proper formatting.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists