From patchwork Thu Mar 28 09:42:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li RongQing X-Patchwork-Id: 231965 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B120A2C00B3 for ; Thu, 28 Mar 2013 20:42:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756410Ab3C1Jmv (ORCPT ); Thu, 28 Mar 2013 05:42:51 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:56252 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754879Ab3C1Jmu (ORCPT ); Thu, 28 Mar 2013 05:42:50 -0400 Received: by mail-bk0-f53.google.com with SMTP id e19so2208767bku.12 for ; Thu, 28 Mar 2013 02:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer; bh=YaSCcWfwMgNJ6ICAsRJnSQBFRbNBEAtbyoh+PUAN2v0=; b=A6MklldMOljVVK5kVr2SIrId8yhZ5EHKmw+RSMIZotzgq4nAuQPpw2UjaaAQJ8+b6i 4nnx9bOpC1KFyax+wC+Sie78f+2kNW80K1tAKtUd+VDO297ccrWRkl5/Pin16KO2znfx kwuF1nLJ92YhbgMUq8jlqmVvK5wqCc12sy++UHkvpuR75mt1e8uLeN3+AgdlodOkdguI 7tyk6jbv0eBoNp9ESBO70mosr4PS8b2T/8E0UQfTJaf532FeadM12ajt9PAiqK95a/eJ O02C8xpZBrBFTI2IfLEx9VdE9GEXBVQ+P9BwWCjJdlv0uvSu19qRUmkzAbd3B40Qx7tN pYVA== X-Received: by 10.205.100.198 with SMTP id cx6mr11836526bkc.106.1364463768098; Thu, 28 Mar 2013 02:42:48 -0700 (PDT) Received: from localhost ([61.148.56.138]) by mx.google.com with ESMTPS id jt9sm1696948bkb.18.2013.03.28.02.42.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Mar 2013 02:42:47 -0700 (PDT) From: roy.qing.li@gmail.com To: netdev@vger.kernel.org Subject: [PATCH] core: fix the use of this_cpu_ptr Date: Thu, 28 Mar 2013 17:42:41 +0800 Message-Id: <1364463761-32510-1-git-send-email-roy.qing.li@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Li RongQing flush_tasklet is not percpu var, and percpu is percpu var, and this_cpu_ptr(&info->cache->percpu->flush_tasklet) is not equal to &this_cpu_ptr(info->cache->percpu)->flush_tasklet 1f743b076(use this_cpu_ptr per-cpu helper) introduced this bug. Signed-off-by: Li RongQing --- net/core/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/flow.c b/net/core/flow.c index 7fae135..e8084b8 100644 --- a/net/core/flow.c +++ b/net/core/flow.c @@ -346,7 +346,7 @@ static void flow_cache_flush_per_cpu(void *data) struct flow_flush_info *info = data; struct tasklet_struct *tasklet; - tasklet = this_cpu_ptr(&info->cache->percpu->flush_tasklet); + tasklet = &this_cpu_ptr(info->cache->percpu)->flush_tasklet; tasklet->data = (unsigned long)info; tasklet_schedule(tasklet); }