From patchwork Wed Jan 23 04:43:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amerigo Wang X-Patchwork-Id: 214763 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 88C0E2C007C for ; Wed, 23 Jan 2013 15:44:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753184Ab3AWEoA (ORCPT ); Tue, 22 Jan 2013 23:44:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5931 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752955Ab3AWEn7 (ORCPT ); Tue, 22 Jan 2013 23:43:59 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0N4hwo7032526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Jan 2013 23:43:59 -0500 Received: from cr0.redhat.com (vpn1-114-89.nay.redhat.com [10.66.114.89]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0N4hrxq017231; Tue, 22 Jan 2013 23:43:55 -0500 From: Cong Wang To: netdev@vger.kernel.org Cc: "David S. Miller" , Cong Wang Subject: [Patch net-next] net: add RCU annotation to sk_dst_cache field Date: Wed, 23 Jan 2013 12:43:49 +0800 Message-Id: <1358916229-19004-1-git-send-email-amwang@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Cong Wang sock->sk_dst_cache is protected by RCU. Reported-by: Fengguang Wu Cc: David S. Miller Signed-off-by: Cong Wang --- -- 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/include/net/sock.h b/include/net/sock.h index 5a34e2f..c4b64c6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -337,7 +337,7 @@ struct sock { #endif unsigned long sk_flags; struct dst_entry *sk_rx_dst; - struct dst_entry *sk_dst_cache; + struct dst_entry __rcu *sk_dst_cache; spinlock_t sk_dst_lock; atomic_t sk_wmem_alloc; atomic_t sk_omem_alloc;