Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1989405lqa; Tue, 30 Apr 2024 05:38:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1tcq1j2u4CY7fzNuhyNxFx7MOzqZH9lm3RFe8eoKTeIOvTQQyw5S9G9IhGu+pvhAb5i3rAdUeJ7qfvaUPEzIfcF5FhxAIqSv3Zp+fqA== X-Google-Smtp-Source: AGHT+IG+Ax5ZfkZS05FbTLoT+pQvJfQtLrCIdf84Vp6dx8gV9Lz0heye8AXe1fsteQSywOCfojQT X-Received: by 2002:a17:906:787:b0:a55:a895:46ae with SMTP id l7-20020a170906078700b00a55a89546aemr8657655ejc.63.1714480681695; Tue, 30 Apr 2024 05:38:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714480681; cv=pass; d=google.com; s=arc-20160816; b=xs+y8f6hr++xK9Yo8UelRmycT0DPpU9HhN/oa3tRUn9+jmrvuu4dAvvvvOBJnQ0gKo rpjE6xyFRZ9TtCohW9A/FXSfwSnkxobNxvDnY7fRrSrt6S65tDOoC3Pc/GL+HlPJhVOJ kKhRt8H8mdzsdGFotT3tEpR+Z1Vlk8k8PuWdFCk71U2O9E93IEXmiNjIwAjLOlUOrQ2l jKWoT7VPok6F4p7V9xZr8aN4CAzz1OfbFQfYZPooIZYTmAa+SoZOtmeIZqopk5G56EwN e78pQhWpj/4lc1jdVhGtHK7cV6imygNnOvMPxSdVCgLmierXlVED/2jQ969fyA4Iz3aP TffA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=P0lacwrMCw3G9BvoUqJs9pKTPfNhYjsHB7mBDb6ejY0=; fh=4c2KV6xW6HImuEFQJrjl3NUKPyFfOd1rb0ksShyzDgs=; b=wl4zJ/uKzNzxmYOqKPIYwCV13/Ic88C0u0Dv0drJ0qyT6PKLH6rRm1EmgAY7dSsCLv T8koCBWe2jw9AlAsmVcNRjUpOxx20vGr9phicuoQYYDQjq6WneF57hLyYydcFPR+HcUW HsBwicHvm98vuwkYa2CL6p9lxWaC3Xa4kaEbPJnqjCa2xKzQ+XFqq+/uxrY1g8YrbFp2 9YsfiWKCVvtm+qRSkuJMIzXbgpQ4iUwvdci66rvjZFIoQmyj4/dRvTJkuq9zNOetUUwF qn8b80K/p5SIQh4SHFyQXr8k4PiUQ+UjoVJMDc9By3zQKgBm5WF7N1ikj3q39JGs4l2k GmXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UdG6Whia; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-163920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id uz14-20020a170907118e00b00a5224182cf4si14530105ejb.655.2024.04.30.05.38.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UdG6Whia; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-163920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6EF0E1F22554 for ; Tue, 30 Apr 2024 12:38:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8877D17109A; Tue, 30 Apr 2024 12:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UdG6Whia" Received: from mail-ej1-f68.google.com (mail-ej1-f68.google.com [209.85.218.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43899171062; Tue, 30 Apr 2024 12:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.68 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480671; cv=none; b=JrkFjEpLRA5u/PsYCMCjSAigX/Qb4fqBmlhOfmVuQRtBhMgOvBUuzDKr42w4uouZOZ3GIM7mUnhpxJXOadMuR7dh5B1Y4jEneMSr6M0kGFQ1bN8ICW92VFlzvBseEYt4EhsYKNHde5h6XcglFNf611ktvL8UBM9MSV5iIDtw7wE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480671; c=relaxed/simple; bh=KmT8Ckyct/qkynI81wU2lhJ/4ljfYIDCJj1VpehlV/o=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mNmviFV5kZUYlCOxTgqfcvj082wMkNQwmB5YzOdbeEDqLAMHvpGMNNtRs53JNDOzpfrb7LVzs3rSuJdISCfEQMAVmxwOSYY8OPyN2XkkSZx7yR8mhoL23BlEi2urgYdbf5cWJgAeDg8NXz7sZsjAHmZCEFsUKmbQsq5/Aj1DUh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UdG6Whia; arc=none smtp.client-ip=209.85.218.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f68.google.com with SMTP id a640c23a62f3a-a58c89bda70so513215866b.3; Tue, 30 Apr 2024 05:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714480668; x=1715085468; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P0lacwrMCw3G9BvoUqJs9pKTPfNhYjsHB7mBDb6ejY0=; b=UdG6Whia8+jOfjUyhZDf4SL5VTwiJpuI7ulugqZAdM+VSt2+e4tUpd+SjXFvUoEByf 3MqsiFMJVo/X5XeWH+EkFBz9ff9STFRVtdX4S0ETMhI6PUcvrFEMPv6P97FCD5+8Hc1K ZUMARnP3Xy88Ay0kE1hYXSS2ZxDNQ7X2mbmTNqXnjmGfD2psdVaoWr++XRKv93XoHznB Nj/JqcEmVvqFobeSnhWL31USLxUI6ufzHMHFw6QOGTpT4ENdxgVzmUch4iIFbNtKe9Ql v/jn86aeZmmlbk55D01VoT38XB8BUsqU0ljpVZZV4+V1/DncCYpeH1Jtm5s3YdR2KKOZ mHYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714480668; x=1715085468; 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=P0lacwrMCw3G9BvoUqJs9pKTPfNhYjsHB7mBDb6ejY0=; b=SRanym9+sEiWrzAJcJpvX3L4RI31vywQhN3IaZ4XU9PtncXAoavZo61xATDrnRa220 8kMYrsqXb9FKQSBoqcPKcSkNg8V4+RrRUMeiv/Y7D/vDBWh55tTMmJyBhRkAEg/w6UxB FvPTx6fljjR/mnU1QlsGKdAzLhdEfU0+RI4HLGq/jdAFbT4WgNatxxApRF1Me4WdHYMq eBXed7i23ikvqu5XquK0LJUswJmpitgl7aHR88W+rfCKys6PqYwXfyarYnYAXguGf40s jBOeZ/xv8T+FLksfRnAfj+8V0ayqdka7Quuo4cTUlki4+/AaKslT1cjLRetDH5Clmqyu bJSA== X-Forwarded-Encrypted: i=1; AJvYcCXdwKvdvTm1QkbUTyVMPJ4RBeI0B0lVIxmydM5F02usVSiQ0FfmezQYOKznNqG+1nCgz0P14DsipWJN++P1TgCdvC+pQIINnoMG5uWKn3VLxTIIMjfunoF6WgTqUk9NeqMxFyKPXh/AdWtKbR/ch8gookedWhwiXWkGv6nbaAJsVAJf X-Gm-Message-State: AOJu0YwT08e7ePbbpWVuh1uPmc1iH+2rQAto3lnYAHxSkyCDxHkyOqRP jLxlQWCMTsvoYA0XPwTcLRbPhZitRIk8K89VwhOfn2Nfiu75CSsdh9yqR9sHY+9fGwSOhQVChSQ XtcR7e+dF5pn7papAXyLkyLD8H4o= X-Received: by 2002:a17:906:2c06:b0:a55:9195:362c with SMTP id e6-20020a1709062c0600b00a559195362cmr8698551ejh.49.1714480668203; Tue, 30 Apr 2024 05:37:48 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240430-bpf-next-v3-0-27afe7f3b17c@kernel.org> <20240430-bpf-next-v3-1-27afe7f3b17c@kernel.org> In-Reply-To: <20240430-bpf-next-v3-1-27afe7f3b17c@kernel.org> From: Kumar Kartikeya Dwivedi Date: Tue, 30 Apr 2024 14:37:11 +0200 Message-ID: Subject: Re: [PATCH bpf-next v3 1/3] bpf: do not walk twice the map on free To: Benjamin Tissoires Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Tue, 30 Apr 2024 at 12:43, Benjamin Tissoires wrote: > > If someone stores both a timer and a workqueue in a map, on free we > would walk it twice. > Add a check in array_map_free_timers_wq and free the timers > and workqueues if they are present. > > Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps") > Signed-off-by: Benjamin Tissoires > > --- > > no changes in v3 > > no changes in v2 > --- Acked-by: Kumar Kartikeya Dwivedi > [...]