From patchwork Sat Feb 16 04:10:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 220926 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 A86702C007C for ; Sat, 16 Feb 2013 15:10:31 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751407Ab3BPEK1 (ORCPT ); Fri, 15 Feb 2013 23:10:27 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:40890 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099Ab3BPEK0 (ORCPT ); Fri, 15 Feb 2013 23:10:26 -0500 Received: by mail-pa0-f50.google.com with SMTP id fa11so2053138pad.9 for ; Fri, 15 Feb 2013 20:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:x-mailer:content-transfer-encoding :mime-version; bh=vZzO0t7uzLXa7RYBaUUKdhfsPIuXRz462sdTnSHsH/0=; b=X6c0gBdCYGHO84v/m5dNGQ5hWsmJsTP/6Vth0ibXvjtRpa4qRh+X46PpqSZu+S+E9g jqU3xckoc9kJZuO1Xhw1qE8T0LjMAddc2uvJOYBWIfi0/M+SUOCokAU44OSTr2+7V720 4p2of4NKvkO6qNEIfdK+n4rjT7bVoJJZ54uXbva8d6JjCSL0rt/iznUapvrROLYBholY PxpBw4K9HALwin5jKC+E6Weo7YGBw0ZIZNqABgB39Bk+wOLHTLhxWJ9HvEzUGHKA2VG7 6ytiGT5ZYaFz2rjILdceTJOyVG7lh/p67aldc45OYVLMDI5ogpxX/NWxPIgRTVY5Qz4H K/9w== X-Received: by 10.68.135.68 with SMTP id pq4mr11571455pbb.12.1360987825996; Fri, 15 Feb 2013 20:10:25 -0800 (PST) Received: from [172.26.55.182] ([172.26.55.182]) by mx.google.com with ESMTPS id zm1sm6718018pbc.26.2013.02.15.20.10.24 (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 15 Feb 2013 20:10:25 -0800 (PST) Message-ID: <1360987823.19353.42.camel@edumazet-glaptop> Subject: Re: [Patch net-next v2] netpoll: add some missing __rcu marks in several places From: Eric Dumazet To: Cong Wang Cc: David Miller , netdev@vger.kernel.org, jiri@resnulli.us, vyasevic@redhat.com, stephen@networkplumber.org Date: Fri, 15 Feb 2013 20:10:23 -0800 In-Reply-To: <1360984587.12539.2.camel@cr0> References: <20130213223935.122d035b@nehalam.linuxnetplumber.net> <1360831039-11418-1-git-send-email-amwang@redhat.com> <20130214.132054.2237485951582283881.davem@davemloft.net> <1360984587.12539.2.camel@cr0> X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, 2013-02-16 at 11:16 +0800, Cong Wang wrote: > The reason is we don't dereference ->npinfo pointer, we just check if it > is NULL, so doesn't need to call rcu_dereference(). Or am I missing > anything? Yes you are missing that the right thing to do is to use rcu_access_pointer() Sparse errors should not be fixed using random RCU verbs, please be more careful. --- 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 diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 05c5efe..03e5949 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -950,7 +950,7 @@ static void team_port_disable_netpoll(struct team_port *port) static struct netpoll_info *team_netpoll_info(struct team *team) { - return team->dev->npinfo; + return rcu_access_pointer(team->dev->npinfo); } #else