From: Martin KaFai Lau Subject: [PATCH RFC net 0/3] ipv6: Fix potential deadlock when creating pcpu rt Date: Thu, 13 Aug 2015 00:58:00 -0700 Message-ID: <1439452683-964514-1-git-send-email-kafai@fb.com> References: <20150808100028.GA14897@sesse.net> Mime-Version: 1.0 Content-Type: text/plain Cc: Hannes Frederic Sowa , FB Kernel Team To: netdev , "Steinar H. Gunderson" Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:33090 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752298AbbHMH6e (ORCPT ); Thu, 13 Aug 2015 03:58:34 -0400 Received: from pps.filterd (m0044008 [127.0.0.1]) by mx0a-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id t7D7u0lf003072 for ; Thu, 13 Aug 2015 00:58:34 -0700 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 1w8pku8316-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 13 Aug 2015 00:58:34 -0700 Received: from facebook.com (2401:db00:20:7029:face:0:33:0) by mx-out.facebook.com (10.212.236.87) with ESMTP id 1779737e419111e591130002c9521c9e-eb0626b0 for ; Thu, 13 Aug 2015 00:58:32 -0700 In-Reply-To: <20150808100028.GA14897@sesse.net> Sender: netdev-owner@vger.kernel.org List-ID: This patch series fixes a potential deadlock when creating a pcpu rt. It happens when dst_alloc() decided to run gc. Something like this: read_lock(&table->tb6_lock); ip6_rt_pcpu_alloc() => dst_alloc() => ip6_dst_gc() => write_lock(&table->tb6_lock); /* oops */ Patch 1 and 2 are some prep works. Patch 3 is the fix. Original report: https://bugzilla.kernel.org/show_bug.cgi?id=102291 Steinar, the patches can also be applied to 4.2-rc5 (I just tried). Can you help to test them? Thanks!