Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6470791rwb; Tue, 22 Nov 2022 14:00:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5BYKUimQRxhe0pLxAjQqA6yiybQmUFzERVZ73MyLsiVRRtc5NDlUEPhM47kx1eJ9jKh88K X-Received: by 2002:a17:906:9457:b0:7ac:db40:7e1 with SMTP id z23-20020a170906945700b007acdb4007e1mr21622634ejx.204.1669154410481; Tue, 22 Nov 2022 14:00:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669154410; cv=none; d=google.com; s=arc-20160816; b=anvKs3ZEFUbOCN/5TR6ZrazdL5ggo72Vz6dd8OP7NlG9pqjnfOgmH5C7XuIbnN+yr/ ky1im+z6RzJ6tjWPhjxeSWOe3FJspV+rjklcMB0RitMiMR3p5SgUCHTHkM+B6j6PJC1k B/ollZbXBxH0KaZF0OqxxY9n8qHVwFHxA0Kn2D8vK+CAY8/G7lutq2pzvUZGcK68I0s4 UKpwbWn3R/DxPoykZ7mJipKL+Q3etVtVbhV8PEkKRFchpXQJuPaPIxdoppvq4+B2HQqo hg1A5VmSuTxr3UtAz4ZrqMOm/Ah21xp03lONXDQOE7wRo0xqjgC3d976w54PQ9plzKqS RKcw== 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=XemRWqlgdisS5G+QdDulcaJOYTLVd9oV+kjsYT+3Kd4=; b=mJ2MnApN0mreY8ICZMyQM1ABuh53ZuvFaDw6y3Xqs0iNK6oKvaOdprhpRSlnIt/MCX EA+b4+SiwoSpGK1LaCZou7Gg4UVYD3dNtIMgDKTvt0NGqH+LaEoTpRb6CEGDjg9iN0iz jrAvXXqm9GziC+aR1/UwdXTFBVPadHNrykThs8lbzeXjjtlFrb0hOzrnKq9hkC6w663e x5tbJH4CKGkWYw6dNFfUhajmw3HJN7izG4K/4VO2ayXiSjilNKiEQg+81aGW+U3rln72 8/scAUJUKj5TJX1ql6/pyzAeu+KSRKHje2oW87wkQiLoMKYn9x+0V9VjwbdXDmrDS6Lz HkWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xb1-20020a170907070100b0078d8cc2006csi14710118ejb.697.2022.11.22.13.59.48; Tue, 22 Nov 2022 14:00:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234817AbiKVVPY (ORCPT + 89 others); Tue, 22 Nov 2022 16:15:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234785AbiKVVPU (ORCPT ); Tue, 22 Nov 2022 16:15:20 -0500 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34A8C742E1; Tue, 22 Nov 2022 13:15:18 -0800 (PST) Date: Tue, 22 Nov 2022 22:15:14 +0100 From: Pablo Neira Ayuso To: Felix Fietkau Cc: netfilter-devel@vger.kernel.org, Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] netfilter: nf_flow_table: add missing locking Message-ID: References: <20221121182615.90843-1-nbd@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221121182615.90843-1-nbd@nbd.name> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 21, 2022 at 07:26:15PM +0100, Felix Fietkau wrote: > nf_flow_table_block_setup and the driver TC_SETUP_FT call can modify the flow > block cb list while they are being traversed elsewhere, causing a crash. > Add a write lock around the calls to protect readers Applied, thanks