Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp579194pxj; Fri, 28 May 2021 10:20:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoN3WgLYOS5Es9yBb9UNFitlhGGOLT32niwFMZc/wvN6ifuklUKQCbDkmXlejOnjUwbnoH X-Received: by 2002:a17:907:9041:: with SMTP id az1mr7636623ejc.133.1622222457357; Fri, 28 May 2021 10:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622222457; cv=none; d=google.com; s=arc-20160816; b=CrLvO3fNUiybhrDgvSQ2cehjuuhBcojZWbPP6LW6aHiWgm/YbQsiNZhyuTNV0T8nTx oyBTAxqLHzxsTLQKoKFoecIFsiiLKQndVnjcNuWWy1tvQeKFl55k4DTya/E6ATn8Lvvq Mr48oEz/YTTQSlDDTBuiXiI3zhKH1/rURUNXmoS9g2Eq2hJoncwmN0Pj1Q5sMQZS1icB PrxNH8ktN7VRAysQ8C01ZEXpraO0XYjsAcy0S6kd/YZixGo+yub866XYwr2GZ4P6sjdK IoTuCZgLD2lew2YG8JKb8kjSqonYHnyl5xvF/18MwRjiqEIlE4rhcdMZ5OMlJhOoTIsp LwCg== 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:dkim-signature :dkim-signature:date; bh=MM/fYlgGh387J6P2lgkdYt7pFux0FECvUjgf+Lt7YEM=; b=QoNE/JBKUsMUm3Oslav6klhjbjTU6ZID5XmWPt/FnoWZ+FBuniwkkUK8W0ooWEwxAQ iUFct448zsTkblHIgqnIFdFhr3RpRdTuoDG1m5monQ7kon+Ix9je7KAUO19CSWV+Vo47 6FAuDPD9dnFr6NBg0eKv9ftNXkv7yr6VE99gujlm7X2UV9IXrhn4FUfrb1iiisTUP20W Vp47EVTHA9Y1K8izE+PVY6/eVB4YSQXiPvLil724UkvIOyoCuqb/YqMQPNYCw0t3LutS TosYWKTTyDz2Xly1BGJJQsYXh/eR9bc1sg6v/HwuzpQigrYgo9NkO1pnfnHlB2519nvQ lrgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H3aDHB9C; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si5134734ejh.177.2021.05.28.10.20.34; Fri, 28 May 2021 10:20:57 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=H3aDHB9C; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236402AbhE1Qqi (ORCPT + 99 others); Fri, 28 May 2021 12:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235710AbhE1Qqf (ORCPT ); Fri, 28 May 2021 12:46:35 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A835C061574; Fri, 28 May 2021 09:44:41 -0700 (PDT) Date: Fri, 28 May 2021 18:44:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1622220279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MM/fYlgGh387J6P2lgkdYt7pFux0FECvUjgf+Lt7YEM=; b=H3aDHB9C1CRQ7mhy6uWO5eta+z8bvP7br4OWLOtZ5PZbpoLBW9jH/len3RLer3rypH4/EJ qyIZ3JgIUzETrn65te7SlpJkneIpOZeQzHt5Oz8KTAvPyMnJA21YZS//ngaYt+senX75ft iGra+Ea9s/w5+S4x7QHUIBfK6OxVi7/Lh9V9ZNC3WDL8Xvr2Kd8XuBlyXmI+WE3PIKKyx+ b4IT/v5t6d7WWDOqNV13Cb0RqXRR5jHPbndGiH7lV06dzcOVZsXod1Qjbd4b4mDajK2hBp 0IrSXdWbSNVtbaABBM19yDgBRZ/HOqcuHdREI1hIUAnmK8G9/FFY+OXI6ZrqoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1622220279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MM/fYlgGh387J6P2lgkdYt7pFux0FECvUjgf+Lt7YEM=; b=hfb/qxn1syliAp0nMJggRr/rVQ29hRm6PaKz3PonsdTNrwKvwxFG4+vHIKNN+O2rGQDZE1 efe5QY63d6VDorCA== From: "Ahmed S. Darwish" To: Varad Gautam Cc: linux-kernel@vger.kernel.org, linux-rt-users , netdev@vger.kernel.org, stable@vger.kernel.org, Steffen Klassert , 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: 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: <20210528160407.32127-1-varad.gautam@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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