From patchwork Wed Oct 26 14:40:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9397389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7402E600BA for ; Wed, 26 Oct 2016 14:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4881429B83 for ; Wed, 26 Oct 2016 14:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ABF229BE6; Wed, 26 Oct 2016 14:40:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5685B29B83 for ; Wed, 26 Oct 2016 14:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbcJZOki (ORCPT ); Wed, 26 Oct 2016 10:40:38 -0400 Received: from mx142.netapp.com ([216.240.21.19]:22076 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754100AbcJZOkg (ORCPT ); Wed, 26 Oct 2016 10:40:36 -0400 X-IronPort-AV: E=Sophos;i="5.31,551,1473145200"; d="scan'208";a="147593978" Received: from hioexcmbx05-prd.hq.netapp.com ([10.122.105.38]) by mx142-out.netapp.com with ESMTP; 26 Oct 2016 07:40:32 -0700 Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) by hioexcmbx05-prd.hq.netapp.com (10.122.105.38) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 26 Oct 2016 07:40:34 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 26 Oct 2016 07:40:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BrVvTPi7JTy0/CxWNKJiyRfH9PmB/xyw5GH7a7Ytc38=; b=rCF0jlXFpHLnvbU4LfmRW6+HkyQU+Nd3MUrG5kaM2GTy6bvIH18/wAJQpwjTStF3W/3xtPEtYKuHh+huRlWNMp0/WgJtzmnPtJwgBClXJTOz0AJXjRtc4upM11JiEOwousbishUFVC97iV75FZK1XRxtrjj86xobvXsq2Pe3Oig= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com (99.9.112.69) by CY1PR0601MB1644.namprd06.prod.outlook.com (10.163.232.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Wed, 26 Oct 2016 14:40:24 +0000 From: Anna Schumaker Subject: Re: nfs NULL-dereferencing in net-next To: Yotam Gigi , Jakub Kicinski , "Andy Adamson" , Anna Schumaker , "linux-nfs@vger.kernel.org" References: <20161017201943.64529739@jkicinski-Precision-T1700> CC: "netdev@vger.kernel.org" , Trond Myklebust , Yotam Gigi , mlxsw Message-ID: <817e43c5-d88d-e616-7074-5715de29d319@Netapp.com> Date: Wed, 26 Oct 2016 10:40:14 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [99.9.112.69] X-ClientProxiedBy: BY2PR01CA0020.prod.exchangelabs.com (10.163.25.30) To CY1PR0601MB1644.namprd06.prod.outlook.com (10.163.232.18) X-MS-Office365-Filtering-Correlation-Id: 5b764a52-166b-473d-b629-08d3fdae063d X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1644; 2:rIvjWIs33q2HS77kBKbWf+102dNMidsk4JOaXiRNiq2xIrv263pASVBlnyx+7hX/6O/T0+QXtDgc1HidK3pFnucIWIwMM2Z2WLTkDhbF35Sgy3F6vISAcHN6xAlPtYNZRDHU3j/vBQKRpY6uP3MPXEP7HPwFKwL+GRBK5zEazVKasH8DkWQvKIwD5ZlfxkZMq/DvlO5U16Mvf1gb/xI3zA==; 3:hZbncQpr28TTjhHJp4WP9jda+jXgMmSfeAkv/eme634BIWRbdieLAOo7cALCmXZar0RXynasIYyVu7JhdEK0JSTGznLW34BWsZb4fQpFeGORKcWfRzYIyXF/dw2et6Rf8bjYUou8tqRIeC0V4o6qeA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0601MB1644; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1644; 25:RpcbhAknf72Myx8TbJX+V0yHaOKHzAcbLeTR9ntReEnbaLus9mdTzTPFp+/gi9o/7qykheITyTBI29o68UtHJyAJS+dxUj21e0C7cZtku57KZ1Rys5dquxKoMrQbbWyhb14zsZwnH+7Epy9CwDY0Br4Q9bzrRlR4cDHdcqMmTGWrSwvid2JgFaEau3111N8KUCahs0czB98vN02Gu6YJv69amhbMxHcvSv6K76xCHPwv4/1e0cIhib55ccvDCRJoQ8IJyU1PL5FrUIe8iFRIKgsCu16s7WiSTCO1C0+m5fRYQC55QtZSlwZPZ63fG0WYzW17LQHrjwEk+1kOY87vOUV2pKVQzB/pfbFjX08lHY9CmmgcH4cL4DintVSM9KXEPZoPexaDBJ+bqwXSvVANZ9ZvdNtxFMLCNFr4mDA4242xyUA9rSALAzrHmZUvAoc80ODcuafUibc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ESsCHglljzdgNgN9fKHlPEzYSfV2Kl9gqE466PMiYb++mVU+lvAcTw7v21kF+Nhcr23UIGpE8aNtr4eB4nTm1KPVA5YHfrr3Dib3DY5VoUbDhY03Fu7Pn2TkHHzyStyhgqNKLXmgOrqx4Retv+VDUBMKGesjSB5Evuh X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6042046)(6043046); SRVR:CY1PR0601MB1644; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0601MB1644; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1644; 4:kPtX2hTVwhyjmfZX4J0VUJ9wTCzItZ2jZo1iAZjlMHDHKOFowBb58O/ftor8YTAfdw2HV7Lg14dM05hzZUGaQSRPEGSxR6qoeZkvH5GJ2RzY0pQmLj2dznF+sJ+ta9TSTO0dMaUTXzD7pjmsK+XMtfxdfEy/ySRrr1H31zutGO/iE5G2arPsaPv1Z6Xs+bYA0sHEFsh5PsnmS9ltuJ0CypdI1bAPUy5fIOkQ/hpq6fOjZ9E9aljvc9vJX/9xBXTxnvdyzHO+ItAFAlvcHrMBw77wOOVqUFFinzaAb0tVH5Js7QE2DKGAFwMwQ0azajSrq9vNaQc8wPeKjlo+6tFu5ox/YnVawpkukZBy2boMeUxfMYNU+Kr/zk5j2BgaItyj8J6AL5AfLvjAfBRrROBAfF4Crd1hCstWLWPY5WBiIa7Zm5ipyoNE3IbXEy0MaCXf5suBTZW9AKhlYvkO16NqDZ68OAf8sSDJjJ51VaA13nwVxLwfCUjAqPRXefvesAxpBuzEDAeDFiAtXOE6aipA3g== X-Forefront-PRVS: 0107098B6C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(13464003)(377454003)(189002)(199003)(24454002)(2906002)(189998001)(97736004)(83506001)(6666003)(54356999)(5001770100001)(69596002)(36756003)(64126003)(23676002)(4326007)(65956001)(66066001)(101416001)(50986999)(92566002)(47776003)(65806001)(33646002)(7736002)(8676002)(76176999)(230700001)(7846002)(68736007)(50466002)(81156014)(2501003)(31686004)(42186005)(105586002)(305945005)(106356001)(77096005)(53416004)(65826007)(5660300001)(86362001)(81166006)(31696002)(3846002)(6116002)(15975445007)(4001350100001)(19580405001)(575784001)(19580395003)(2950100002)(586003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0601MB1644; H:gouda.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjA2MDFNQjE2NDQ7MjM6SnRJK3FsdlRUSzg1aDdQT0YwTmM5a3FZ?= =?utf-8?B?UmUzQU8vcS8xV1VOYjZSZHZqb1M1Yzd6ekpnOFppQkhsRVRKc2lVL2dUbHFL?= =?utf-8?B?WXRyTVdaZFFDTXVuSkVmMkpyeUNOMkJLZmZkNGMxODhJY2huY1dRZVlhZUhL?= =?utf-8?B?SC9zTnZFTm80SUlRTDJ5OUZCYkdSYlV2UGRUSXk5dlJSUjRIeXlmUjRYeWZN?= =?utf-8?B?K2psYmt4RTFka3lvaHJPelh0OVlRSVcyUHJ0MW5NelVaRzVOaXJ5NFFrNjli?= =?utf-8?B?L1lrcVF2bUxha09VRUJ5OTFFWlhVbVVwZ3ZMZFAxR0pocENjNzFsT296aC9J?= =?utf-8?B?NnJGN2hmUmN6Y0tHZGVkN1VMa3NqUi9leUlpOWxuRmdwQ21DdGxQbU9DL0xs?= =?utf-8?B?R3JjY3hYSEw2bW5ZNHY1bTkxVWQ5b2tnTTREdnBVbWdyZElNaHMwNmJacWRY?= =?utf-8?B?c2NYRW5SRjNwMjRVZGVLc3N3Nm5adGloMW9BOUpaOXp5d3FlNG1JcDVCWVkw?= =?utf-8?B?a2Vme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B1aWCAgwEP10t7fDJWzW2ZZZh45gBN+Y6C6IaWQ=; 24:o7X618bVV7WQo/EFyQ8xwbXMisd4Z1KXhVOC5np4ewwIXMSV1LqP5vvOxOGmFE1JvtPyxb5QGhYDWOfl6XuUbk60zvMhTNdtHa0DaFphTW4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1644; 7:5PijWDfFvU0pR0oWK7/1N7dbI+6NZhjfHDC8psOx2WBtWCVSjrdmQdnRjKTUdHxctRdV2U2Vg1fvl45yZMpzA4IY7wwXUwzdUote6ooTAQvkwpZcxMcoJzIhAcX9A3qaqqrwFQHb2gn/Ay2YXOURT0xA0i+SR8ODdEVbPq3z5HjE5uoNvJ5ib+K/LJunq40g5NppBAGmcsz0eZjjBczf2C7xUQG8/QqqaSVX/50UQ2On5oGhEfq85FPL11J8HbeCd4/s21NXrm87I+UCk51bPjiXlO+9gSplkqISJp+4/PwQMa5Z6F2i/3Ml1XHLThkqWCPV7v7W6EUQ0KQnenXToMGMxz4oPzGEUYTzdDjS6VM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2016 14:40:24.4552 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0601MB1644 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 10/25/2016 01:19 PM, Yotam Gigi wrote: > >> -----Original Message----- >> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On >> Behalf Of Jakub Kicinski >> Sent: Monday, October 17, 2016 10:20 PM >> To: Andy Adamson ; Anna Schumaker >> ; linux-nfs@vger.kernel.org >> Cc: netdev@vger.kernel.org; Trond Myklebust >> Subject: nfs NULL-dereferencing in net-next >> >> Hi! >> >> I'm hitting this reliably on net-next, HEAD at 3f3177bb680f >> ("fsl/fman: fix error return code in mac_probe()"). > > > I see the same thing. It happens constantly on some of my machines, making them > completely unusable. > > I bisected it and got to the commit: > > commit 04ea1b3e6d8ed4978bb608c1748530af3de8c274 > Author: Andy Adamson > Date: Fri Sep 9 09:22:27 2016 -0400 > > NFS add xprt switch addrs test to match client > > Signed-off-by: Andy Adamson > Signed-off-by: Anna Schumaker Thanks for reporting on this everyone! Does this patch help? >From 96376ca1dd4077a1d341bdcb9cc86426ee3844f1 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 26 Oct 2016 10:33:31 -0400 Subject: [PATCH] SUNRPC: Fix suspicious RCU usage We need to hold the rcu_read_lock() when calling rcu_dereference(), otherwise we can't guarantee that the object being dereferenced still exists. Signed-off-by: Anna Schumaker --- net/sunrpc/clnt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.10.1 > > >> >> [ 23.409633] BUG: unable to handle kernel NULL pointer dereference at >> 0000000000000172 >> [ 23.418716] IP: [] rpc_clnt_xprt_switch_has_addr+0xc/0x40 >> [sunrpc] >> [ 23.427574] PGD 859020067 [ 23.430472] PUD 858f2d067 >> PMD 0 [ 23.434311] >> [ 23.436133] Oops: 0000 [#1] PREEMPT SMP >> [ 23.440506] Modules linked in: nfsv4 ip6table_filter ip6_tables iptable_filter >> ip_tables ebtable_nat ebtables x_tables intel_ri >> [ 23.505915] CPU: 1 PID: 1067 Comm: mount.nfs Not tainted 4.8.0-perf-13951- >> g3f3177bb680f #51 >> [ 23.515363] Hardware name: Dell Inc. PowerEdge T630/0W9WXC, BIOS 1.2.10 >> 03/10/2015 >> [ 23.523937] task: ffff983e9086ea00 task.stack: ffffac6c0a57c000 >> [ 23.530641] RIP: 0010:[] [] >> rpc_clnt_xprt_switch_has_addr+0xc/0x40 [sunrpc] >> [ 23.542229] RSP: 0018:ffffac6c0a57fb28 EFLAGS: 00010a97 >> [ 23.548255] RAX: 00000000c80214ac RBX: ffff983e97c7b000 RCX: ffff983e9b3bc180 >> [ 23.556320] RDX: 0000000000000001 RSI: ffff983e9928ed28 RDI: ffffffffffffffea >> [ 23.564386] RBP: ffffac6c0a57fb38 R08: ffff983e97090630 R09: ffff983e9928ed30 >> [ 23.572452] R10: ffffac6c0a57fba0 R11: 0000000000000010 R12: ffffac6c0a57fba0 >> [ 23.580517] R13: ffff983e9928ed28 R14: 0000000000000000 R15: ffff983e91360560 >> [ 23.588585] FS: 00007f4c348aa880(0000) GS:ffff983e9f240000(0000) >> knlGS:0000000000000000 >> [ 23.597742] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >> [ 23.604251] CR2: 0000000000000172 CR3: 0000000850a5f000 CR4: >> 00000000001406e0 >> [ 23.612316] Stack: >> [ 23.614648] ffff983e97c7b000 ffffac6c0a57fba0 ffffac6c0a57fb90 ffffffffc04d38c3 >> [ 23.623331] ffff983e91360500 ffff983e9928ed30 ffffffffc0b9e560 >> ffff983e913605b8 >> [ 23.632016] ffff983e9882e800 ffff983e9882e800 ffffac6c0a57fc30 ffffac6c0a57fdb8 >> [ 23.640706] Call Trace: >> [ 23.643535] [] nfs_get_client+0x123/0x340 [nfs] >> [ 23.650542] [] nfs4_set_client+0x80/0xb0 [nfsv4] >> [ 23.657642] [] nfs4_create_server+0x115/0x2a0 [nfsv4] >> [ 23.665230] [] nfs4_remote_mount+0x2e/0x60 [nfsv4] >> [ 23.672519] [] mount_fs+0x3a/0x160 >> [ 23.678254] [] ? alloc_vfsmnt+0x19e/0x230 >> [ 23.684669] [] vfs_kern_mount+0x67/0x110 >> [ 23.690990] [] nfs_do_root_mount+0x84/0xc0 [nfsv4] >> [ 23.698284] [] nfs4_try_mount+0x37/0x50 [nfsv4] >> [ 23.705287] [] nfs_fs_mount+0x2d1/0xa70 [nfs] >> [ 23.712092] [] ? find_next_bit+0x18/0x20 >> [ 23.718413] [] ? nfs_remount+0x3c0/0x3c0 [nfs] >> [ 23.725316] [] ? nfs_clone_super+0x130/0x130 [nfs] >> [ 23.732606] [] mount_fs+0x3a/0x160 >> [ 23.738340] [] ? alloc_vfsmnt+0x19e/0x230 >> [ 23.744755] [] vfs_kern_mount+0x67/0x110 >> [ 23.751071] [] do_mount+0x1bf/0xc70 >> [ 23.756904] [] ? copy_mount_options+0xbb/0x220 >> [ 23.763803] [] SyS_mount+0x83/0xd0 >> [ 23.769538] [] entry_SYSCALL_64_fastpath+0x17/0x98 >> [ 23.776817] Code: 01 00 48 8b 93 f8 04 00 00 44 89 e6 48 c7 c7 98 b2 43 c0 e8 9f 0d d4 >> f9 eb c0 0f 1f 44 00 00 0f 1f 44 00 00 >> [ 23.802909] RIP [] rpc_clnt_xprt_switch_has_addr+0xc/0x40 >> [sunrpc] >> [ 23.811857] RSP >> [ 23.815839] CR2: 0000000000000172 >> [ 23.819629] ---[ end trace 9958eca92c9eeafe ]--- >> [ 23.827345] note: mount.nfs[1067] exited with preempt_count 1 > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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/sunrpc/clnt.c b/net/sunrpc/clnt.c index 34dd7b2..62a4827 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2753,14 +2753,18 @@ EXPORT_SYMBOL_GPL(rpc_cap_max_reconnect_timeout); void rpc_clnt_xprt_switch_put(struct rpc_clnt *clnt) { + rcu_read_lock(); xprt_switch_put(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); + rcu_read_unlock(); } EXPORT_SYMBOL_GPL(rpc_clnt_xprt_switch_put); void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) { + rcu_read_lock(); rpc_xprt_switch_add_xprt(rcu_dereference(clnt->cl_xpi.xpi_xpswitch), xprt); + rcu_read_unlock(); } EXPORT_SYMBOL_GPL(rpc_clnt_xprt_switch_add_xprt); @@ -2770,9 +2774,8 @@ bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt, struct rpc_xprt_switch *xps; bool ret; - xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch); - rcu_read_lock(); + xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch); ret = rpc_xprt_switch_has_addr(xps, sap); rcu_read_unlock(); return ret;