From patchwork Tue May 10 02:23:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 94931 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 4F43BB6EE6 for ; Tue, 10 May 2011 12:23:38 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386Ab1EJCXP (ORCPT ); Mon, 9 May 2011 22:23:15 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:36264 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085Ab1EJCXO (ORCPT ); Mon, 9 May 2011 22:23:14 -0400 Received: by wwa36 with SMTP id 36so6369304wwa.1 for ; Mon, 09 May 2011 19:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=J4/SCN93BMggqYR3IY0t7N3TzXOBBpG7y5sVRFAqi1g=; b=iYMnqU2XTKmBr7qF2KTqYCzH8yU1Wu3ndv/q7yQcNMdOcARRSYx4irOvUg5KJnAQj7 HTcnmOBQYiNBMnnc4wKFmulCumrg4TpK2dwDvQ2HN0xPm7YXoLyWav+aTwP5lfUwa3fE EPCSe8/N3J+ryhY/Sh08VRNzObo1Mvqz/c7qE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=J+R4EkElW0csVL9LS4rC9DHg3RfOiFYRw2VamoSdVmmR+AcB3iXbQQh+crQPPYbSXO F1DB6ttG+pkjSbrIyk0Dp2QET6BYP6FEwwRgKCyAFr2b+GNRHG+ZAAAco7h7szrkwLFT OneMJMrAys+K+ZIOI+p6vcaCHUBjFFvlN2roQ= Received: by 10.216.68.6 with SMTP id k6mr2856613wed.85.1304994192574; Mon, 09 May 2011 19:23:12 -0700 (PDT) Received: from [10.150.51.211] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id z9sm4100154wbx.51.2011.05.09.19.23.10 (version=SSLv3 cipher=OTHER); Mon, 09 May 2011 19:23:11 -0700 (PDT) Subject: Re: 2.6.39-rc6-mmotm0506 - another lockdep splat (networking this time) From: Eric Dumazet To: Valdis.Kletnieks@vt.edu Cc: Andrew Morton , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org In-Reply-To: <6954.1304989523@localhost> References: <6954.1304989523@localhost> Date: Tue, 10 May 2011 04:23:08 +0200 Message-ID: <1304994188.3050.17.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le lundi 09 mai 2011 à 21:05 -0400, Valdis.Kletnieks@vt.edu a écrit : > Seen during boot this afternoon: > > [ 43.309549] > [ 43.309550] =================================================== > [ 43.309553] [ INFO: suspicious rcu_dereference_check() usage. ] > [ 43.309555] --------------------------------------------------- > [ 43.309558] include/linux/inetdevice.h:226 invoked rcu_dereference_check() without protection! > [ 43.309560] > [ 43.309561] other info that might help us debug this: > [ 43.309561] > [ 43.309563] > [ 43.309564] rcu_scheduler_active = 1, debug_locks = 1 > [ 43.309567] 2 locks held by ip/1193: > [ 43.309568] #0: (nlk->cb_mutex){+.+...}, at: [] netlink_dump+0x45/0x1d0 > [ 43.309579] #1: (rcu_read_lock){.+.+..}, at: [] rtnl_dump_ifinfo+0x0/0x156 strange : rcu_read_lock() is correctly held at this point > [ 43.309587] > [ 43.309587] stack backtrace: > [ 43.309590] Pid: 1193, comm: ip Not tainted 2.6.39-rc6-mmotm0506 #1 > [ 43.309592] Call Trace: > [ 43.309599] [] lockdep_rcu_dereference+0x9a/0xa2 > [ 43.309604] [] __in_dev_get_rtnl+0x3c/0x47 > [ 43.309607] [] inet_fill_link_af+0x12/0x5b > [ 43.309611] [] rtnl_fill_ifinfo+0x665/0x710 > [ 43.309616] [] rtnl_dump_ifinfo+0xbd/0x156 > [ 43.309620] [] netlink_dump+0x5f/0x1d0 > [ 43.309624] [] ? consume_skb+0x8a/0x8f > [ 43.309628] [] netlink_recvmsg+0x1dd/0x31d > [ 43.309632] [] ? rcu_read_unlock+0x21/0x23 > [ 43.309636] [] sock_recvmsg+0xed/0x112 > [ 43.309641] [] ? might_fault+0x4e/0x9e > [ 43.309645] [] ? __lock_release+0x93/0x9c > [ 43.309649] [] ? might_fault+0x4e/0x9e > [ 43.309652] [] ? might_fault+0x97/0x9e > [ 43.309656] [] ? copy_from_user+0x3c/0x44 > [ 43.309660] [] __sys_recvmsg+0x16c/0x224 > [ 43.309665] [] ? up_read+0x23/0x27 > [ 43.309669] [] ? arch_local_irq_save+0x9/0xc > [ 43.309673] [] ? fcheck_files+0xb4/0xeb > [ 43.309676] [] ? fget_light+0x35/0x96 > [ 43.309680] [] sys_recvmsg+0x3d/0x5b > [ 43.309686] [] system_call_fastpath+0x16/0x1b > [ 44.437679] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X > [ 44.488363] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X > [ 44.494680] ADDRCONF(NETDEV_UP): eth0: link is not ready > > Thanks for the report, I am taking a look how to fix this. I am testing following patch, I'll provide an official one when validated. --- 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/net/ipv4/devinet.c b/net/ipv4/devinet.c index cd9ca08..6b1eb92 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1369,7 +1369,7 @@ errout: static size_t inet_get_link_af_size(const struct net_device *dev) { - struct in_device *in_dev = __in_dev_get_rtnl(dev); + struct in_device *in_dev = __in_dev_get_rcu(dev); if (!in_dev) return 0; @@ -1379,7 +1379,7 @@ static size_t inet_get_link_af_size(const struct net_device *dev) static int inet_fill_link_af(struct sk_buff *skb, const struct net_device *dev) { - struct in_device *in_dev = __in_dev_get_rtnl(dev); + struct in_device *in_dev = __in_dev_get_rcu(dev); struct nlattr *nla; int i;