Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp86350pxj; Thu, 3 Jun 2021 01:18:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybKAWmOpcYzuTaSkUEGI7BJmwjcWy4lcqYXQM1d35q0Rh/DljSrTwoKTcaxTxWd4MJ7LUG X-Received: by 2002:a17:906:3c56:: with SMTP id i22mr1963357ejg.369.1622708327798; Thu, 03 Jun 2021 01:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622708327; cv=none; d=google.com; s=arc-20160816; b=JE83OblysHVjOMeH9hXhEeyrS5cS8oHbJXbn3dlgy9fu6CiUWHsxx60IvIIUL2fXpJ cKOGvrZip26125LTJX5L68fwcc2PulcQPw33aIueI2tn9Vu+VgiAnX6D8VSe3Sx7Kcu1 65TJsBa3Bhj4c8PLnwEaIBfIX7HD27Btae8MXLN7K4b6OhYjPlQY5G6xgnbvW2HLm3U6 ntUOtT4C4tGpAZd0EgKsGWCNTf6yPmwu9M8Bnr/8+CK/e6WiCzlooxiZLmlp1+6bp5MA BZPv4wJZD56W4nJvlBUhWGe0FU4Lp7Hlg7c9HHXdcihHoOONekly90AcXLZ/FioeiwA2 F1kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3ENUZCZ2cecdl2KyyD4CAkKQsC2VAuNy5/nuFDJDBOg=; b=XqDjnCBN1gxvL7BqF43BnRjmwzL0fN/944SC/CQ7REyVJrZq2DdzXGRMjuhKm96yJ2 b6aaIwpKbou8kCHPyIUkRTx3i3JpWxuiPVMb3QeLuCHiCbIlD86IO/5FmOmXskdUGrWM FT1HLznbhkUk6Q76e+M/HF5Q1Zw/FDoWQWahxi3ZXOwoX0kc9+TnEenhTzMNktencjPN SRImZWqOW7iyyHx8RoAxrKPiS6BTVUcixCm7Zj2F6KAINyiRvGMyqddMUGgWFi/61Agz EM2qo5YLdb3v3H2O3SdoEb//QrIlYS5H3CMn6orID2L7TMUU5XOCDA/2/dO5ldoP55fk 1ZUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si2038824eje.719.2021.06.03.01.18.24; Thu, 03 Jun 2021 01:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbhFCISa (ORCPT + 99 others); Thu, 3 Jun 2021 04:18:30 -0400 Received: from mailout1.secunet.com ([62.96.220.44]:60356 "EHLO mailout1.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbhFCISa (ORCPT ); Thu, 3 Jun 2021 04:18:30 -0400 Received: from cas-essen-02.secunet.de (unknown [10.53.40.202]) by mailout1.secunet.com (Postfix) with ESMTP id E5D41800056; Thu, 3 Jun 2021 10:16:43 +0200 (CEST) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-02.secunet.de (10.53.40.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 10:16:43 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 10:16:43 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 3219831801F6; Thu, 3 Jun 2021 10:16:43 +0200 (CEST) Date: Thu, 3 Jun 2021 10:16:43 +0200 From: Steffen Klassert To: "Ahmed S. Darwish" CC: Varad Gautam , , linux-rt-users , , , Herbert Xu , "David S. Miller" , Jakub Kicinski , "Florian Westphal" , "Peter Zijlstra (Intel)" Subject: Re: [PATCH v2] xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype Message-ID: <20210603081643.GW40979@gauss3.secunet.de> References: <20210528120357.29542-1-varad.gautam@suse.com> <20210528160407.32127-1-varad.gautam@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: cas-essen-01.secunet.de (10.53.40.201) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 06:44:37PM +0200, Ahmed S. Darwish wrote: > On Fri, May 28, 2021, Varad Gautam wrote: > > > > Thead 1 (xfrm_hash_resize) Thread 2 (xfrm_policy_lookup_bytype) > > > > rcu_read_lock(); > > mutex_lock(&hash_resize_mutex); > > read_seqcount_begin(&xfrm_policy_hash_generation); > > mutex_lock(&hash_resize_mutex); // block > > xfrm_bydst_resize(); > > synchronize_rcu(); // block > > > > > ... > > > > Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock") > > Signed-off-by: Varad Gautam > > Acked-by: Ahmed S. Darwish Applied, thanks a lot!