From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FA44C3F68F for ; Thu, 9 Jan 2020 17:07:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 602B62067D for ; Thu, 9 Jan 2020 17:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387967AbgAIRHt (ORCPT ); Thu, 9 Jan 2020 12:07:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:49716 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731444AbgAIRHt (ORCPT ); Thu, 9 Jan 2020 12:07:49 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 56469AE03; Thu, 9 Jan 2020 17:07:47 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 1454DE008B; Thu, 9 Jan 2020 18:07:46 +0100 (CET) Date: Thu, 9 Jan 2020 18:07:46 +0100 From: Michal Kubecek To: Sasha Levin Cc: Naresh Kamboju , Greg Kroah-Hartman , open list , linux- stable , Eric Dumazet , Firo Yang , Jakub Kicinski , rcu@vger.kernel.org, Netdev , lkft-triage@lists.linaro.org Subject: Re: [PATCH AUTOSEL 4.19 46/84] tcp/dccp: fix possible race __inet_lookup_established() Message-ID: <20200109170746.GO22387@unicorn.suse.cz> References: <20191227174352.6264-1-sashal@kernel.org> <20191227174352.6264-46-sashal@kernel.org> <20200109153226.GG1706@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200109153226.GG1706@sasha-vm> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 09, 2020 at 10:32:26AM -0500, Sasha Levin wrote: > On Thu, Jan 02, 2020 at 01:31:22PM +0530, Naresh Kamboju wrote: > > On Fri, 27 Dec 2019 at 23:17, Sasha Levin wrote: > > > > > > From: Eric Dumazet > > > > > > [ Upstream commit 8dbd76e79a16b45b2ccb01d2f2e08dbf64e71e40 ] > > > > > > Michal Kubecek and Firo Yang did a very nice analysis of crashes > > > happening in __inet_lookup_established(). > > > > > > Since a TCP socket can go from TCP_ESTABLISH to TCP_LISTEN > > > (via a close()/socket()/listen() cycle) without a RCU grace period, > > > I should not have changed listeners linkage in their hash table. > > > > > > They must use the nulls protocol (Documentation/RCU/rculist_nulls.txt), > > > so that a lookup can detect a socket in a hash list was moved in > > > another one. > > > > > > Since we added code in commit d296ba60d8e2 ("soreuseport: Resolve > > > merge conflict for v4/v6 ordering fix"), we have to add > > > hlist_nulls_add_tail_rcu() helper. > > > > The kernel panic reported on all devices, > > While running LTP syscalls accept* test cases on stable-rc-4.19 branch kernel. > > This report log extracted from qemu_x86_64. > > > > Reverting this patch re-solved kernel crash. > > I'll drop it until we can look into what's happening here, thanks! It was already discussed here: http://lkml.kernel.org/r/CA+G9fYv3=oJSFodFp4wwF7G7_g5FWYRYbc4F0AMU6jyfLT689A@mail.gmail.com and fixed version should be in 4.19, 4.14 and 4.9 stable branches now. Michal Kubecek