Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp997286pxb; Thu, 17 Feb 2022 21:01:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBKNpt3TuOUrXfzWSL+ohB5nl3uPM5jVWD0VqGukcziM6URf2Bwbe4DHu6NNmXiM5tss77 X-Received: by 2002:a05:6402:10d5:b0:408:f881:f0f3 with SMTP id p21-20020a05640210d500b00408f881f0f3mr6338585edu.112.1645160514910; Thu, 17 Feb 2022 21:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645160514; cv=none; d=google.com; s=arc-20160816; b=t2cx4Efjk8/rhCA399M6DS0k+WGjxf+4KtSxXNoGraq6MGOoysx4TFZXETsj2r/dqZ LPTVVTJ0WSCqGIDdkX1NPDRhFGZWDSkxffuO2gMlBIYZuskvGq0koAN8ulXNk2M0Mjb/ VwLuXRpJv7bSWxB75Cl482Yqow8z5VHXcfJciHCTrJkGDo0NSMtkV9LFj0SHtiPgBdBn oVFwWhuSolRU549bZwH66GSOS5lSSL0KYuCK7LZPIPfUOkJObvI63n2I1GYuMFrhJmnn 3Oayi734DqKeMQ8wUWU6NAQP+IArB3XDoIaOyJ8uJrG0fZqV0XpOrDgMqANF5zOZCvnR Uz0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DqUKnlyPf0evGNa5VWC8E+DZyYMum4Jo4MpsHkFNWxA=; b=WCknNaLhKzdqa4R99z4aCcU0DYbYuNm+sS1xkleag0bhetz0BbAZc0q/nBkd63g6nk vPMreJjXFvPDfmsLxOaSclJNV9WW9on1ALNXm+0/3D6vjXJvbHTb2pab3h9TrGhtr9Q1 49qCDnDjjKFZ0xzRYynfSyk2IHVK617j7NxQehoTEqke5N8Jqv5gImAi57V/wWsa97GN iN6zBPNAM2CiFT9PFaYWF9u2yRqlMkrh4WCc7mQsEkvf+kPxneT8QiptzfL4dNpAdc5M HbmqXAUf8TKyeEyfw5of4X05HzNF036y/MsLB7RxIi6kuQ9Ym6/L/D80Bj9ZsN7ijMOC r8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mQhLDUn7; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13si5352973edj.500.2022.02.17.21.01.32; Thu, 17 Feb 2022 21:01:54 -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=@kernel.org header.s=k20201202 header.b=mQhLDUn7; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbiBREwG (ORCPT + 99 others); Thu, 17 Feb 2022 23:52:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230100AbiBREvy (ORCPT ); Thu, 17 Feb 2022 23:51:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72B0E17C106; Thu, 17 Feb 2022 20:51:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA71461E26; Fri, 18 Feb 2022 04:51:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F31ACC340E9; Fri, 18 Feb 2022 04:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645159887; bh=z9kkrvc2NL5Tbv39j6C/dwiZlTKTgsn2J4KabKbaxaM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mQhLDUn7BMecoLlljM5/8LRUQylO7fGKoFu+B/AoyUZW9vlz2Itz+UzbX2RZAHa7p +XQkKoHce4tKp3bdyenhLoSCOJI7lduCSGFEm1G7CA6BZjR5Y5kiM6+AbRNjj/aEP9 CW2TrEFxM5ONokSWr39ZWED9l1AQNLdGQ59GU2SdxCvwkf0Lgl+zHq6Hea5TFhNTt0 LVb8qYHAn0OuD4Ovx18djQhj8F4YE8WMzE9THb2eVx4pJMLvRHgFpbGcLTsaYHovey mHzi0f+JmqEzlw4f27ORYlMfd826mJruOpwQaEvKXLGnE7ptAjqRkN/Ozmk0PodkMi qnTJRcE+/5H9g== Date: Thu, 17 Feb 2022 20:51:25 -0800 From: Jakub Kicinski To: Volodymyr Mytnyk Cc: netdev@vger.kernel.org, Taras Chornyi , Mickey Rachamim , Serhiy Pshyk , Volodymyr Mytnyk , Taras Chornyi , "David S. Miller" , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: prestera: flower: fix destroy tmpl in chain Message-ID: <20220217205125.7c63432e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <1645022624-2010-1-git-send-email-volodymyr.mytnyk@plvision.eu> References: <1645022624-2010-1-git-send-email-volodymyr.mytnyk@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, 16 Feb 2022 16:43:44 +0200 Volodymyr Mytnyk wrote: > + list_for_each_safe(pos, n, &block->template_list) { > + template = list_entry(pos, typeof(*template), list); nit: list_for_each_entry_safe() > + if (template->chain_index == f->common.chain_index) { > + /* put the reference to the ruleset kept in create */ > + prestera_flower_template_free(template); > + return; > + } > + }