Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4860074rwb; Mon, 21 Nov 2022 12:58:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kMQrd1VaGDUYn7sE6H/qtlXf43/84H8AphyaGjxn9DgL9uYW8r18nnt7KjmtqCTFaKJyE X-Received: by 2002:a05:6402:2b8b:b0:468:cae8:f5a6 with SMTP id fj11-20020a0564022b8b00b00468cae8f5a6mr18323658edb.263.1669064316975; Mon, 21 Nov 2022 12:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669064316; cv=none; d=google.com; s=arc-20160816; b=jtHo4QtHiBia3vqaQmvwi9ZdiK852INSo3Iwhd9V9cA+EMbukmAp5daIg5rV8XsYRf dX+859443SpOy1LaDxq0gU1qGsO/ncBu6gl5l2/E58ND+cUt84PLATOJMWU36BQGzfl+ HSSPJdwRR++Thv868Oww9LZ4C6RJHwTuxcNO6KyoEP95WABQr9rr/QZ2PgyPIO30zeiU DumkwDPKKUaeOylx/O8XslyYs2vSoa3lXMHa9Pc7HFPd2aILtBi+pJSksjDXoTkdexja wjVDN4iJFMRlmsaQoHB4xwnxWbsRL02TXZr3/nyMnbbs60WWWouvVwsZonBJoflRmS59 Cz7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=miGLX/uer5DgQxU7dvQq3Q5LleCS+CJp67dSlDVaExE=; b=bNQziMC0nUhs8IaU0VI2kBWSPqGEMgUtTW0NHPG1phz/MMqk1RDCYINPhAF221+p/x zhyioG5jrqWeD7QzSi7LOnzlrRnaSoXtAZymcnwuB2JWWqyEUY49TJpR/Q+20sEixu1+ uJz5CM1DqxaGCOmUrXWei0XZyb1TLwNO4IrBJIS0+EBOqZUpv8f8s9IN7MP2tunJp3CM 9QSspLZvOtdGOUuHNxP4EvEdnVW1qfipPguEey4tFwxdgoUgvxjlr2BuB9HEaoJvW30I B0uwUKxlqbX2iT24hHyPEaWElxwy9b/7p3YY/iALnA7rm8xd6rrCbM805mqg7xrO9RXl G4ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=W2eOWoW8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a1709060a4a00b0078223ff2756si7660883ejf.244.2022.11.21.12.58.14; Mon, 21 Nov 2022 12:58:36 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=W2eOWoW8; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231573AbiKUTrd (ORCPT + 91 others); Mon, 21 Nov 2022 14:47:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231612AbiKUTr1 (ORCPT ); Mon, 21 Nov 2022 14:47:27 -0500 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3744DD53BA for ; Mon, 21 Nov 2022 11:47:22 -0800 (PST) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-3876f88d320so123690427b3.6 for ; Mon, 21 Nov 2022 11:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=miGLX/uer5DgQxU7dvQq3Q5LleCS+CJp67dSlDVaExE=; b=W2eOWoW8GzSBhampXzP/DkPaV0qxqLK7MXncDfdEBhfBV0RYg1+uYg9j9oBTndzM3T 96Ik633xtnuZok5Z8y8RfrMiVr+a75bpLEwv/Rl49WaGFUifA/lPteT7VUVt2P1uaNhQ p6q1xNDRV1aNGPRDHmUu9DNNwkjc6hHvJIPJOp2GqIagFJX82jlHrGYZvUM01JjJD3YY Xs/LFjGEpBLKr7g+8yqOzY+gYblQXhLmDy2WnCKnCLP1bT6JOr1nxQsyB5lsnEqVPY3q kgAF8ahZxe+UEz+dCBQN3snrVjZ4vOkXoAlPIL0CyKCWtXsWjSGEHAsdyGjs/gC+GDmJ DHdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=miGLX/uer5DgQxU7dvQq3Q5LleCS+CJp67dSlDVaExE=; b=Fb/FZLd/+kQ0/XK2xjtAGWqdeNQ9zUNGXBkSAQ0K4TNz/FsKuqM3IfEFdG/ZrtQFFz zpREET3FwP3lpCVn7SwZCLkcPUr1cVD+xfEf2DHRZ4KcEhNQXTGxeuECKPT7uKnodp9C LJIWAKPZvPOhbCYCJCg2YHLeC6M98r8BP06Za8OLodLF2EVmzGHy+x+zPa5HWygx9h0U 9A1tN+bsqRlNedMAahgwoT93cdqxJIKYDW+DAh1W6G86cqkkVmfbaSwsaG3TOW72OdnT PipbcVn2YPnWHNYSb1EzrOpzJQnfiHJtzFjoNcP15ipQBOwZCQUXJ2XQ35Qzo6M//C+5 kjtg== X-Gm-Message-State: ANoB5pmngK7UiKVoHr7wSj05sD+Nlfn4IQOR8FIq4SesxqIW164Tcw9+ SdBeYbu+tvMQcpdBmjLDmChrTuZGsZpnT8Es7qzD0g== X-Received: by 2002:a0d:c103:0:b0:370:7a9a:564 with SMTP id c3-20020a0dc103000000b003707a9a0564mr18324139ywd.278.1669060041149; Mon, 21 Nov 2022 11:47:21 -0800 (PST) MIME-Version: 1.0 References: <20221121182615.90843-1-nbd@nbd.name> <3a9c2e94-3c45-5f83-c703-75e1cde13be1@nbd.name> In-Reply-To: <3a9c2e94-3c45-5f83-c703-75e1cde13be1@nbd.name> From: Eric Dumazet Date: Mon, 21 Nov 2022 11:47:10 -0800 Message-ID: Subject: Re: [PATCH] netfilter: nf_flow_table: add missing locking To: Felix Fietkau Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , Paolo Abeni , coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 11:45 AM Felix Fietkau wrote: > > On 21.11.22 19:26, 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 > > > > Signed-off-by: Felix Fietkau > Sorry, I forgot to add this: > > Reported-by: Chad Monroe > > - Felix Hi Felix Could you also add a Fixes: tag ? Thanks.