Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp663596lqs; Fri, 14 Jun 2024 01:40:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZrwKj1PVURElerHk/VXhduMhRseXN2BhisxfCPLiFMZXzUBKZqbBsVlYBgG5RMzTSu1fA4s5Ls7LNcrUVUqsbxI/MtGEy6qy6nfwdNQ== X-Google-Smtp-Source: AGHT+IG7KcrLs/QpApKxxUoORvp3TOdWpXXSZkZa04GRNpuajMIecEr+4Ltd8lrTcpl/yF/o/l2A X-Received: by 2002:a17:906:c14b:b0:a69:d82c:167f with SMTP id a640c23a62f3a-a6f60cef7a6mr154674566b.15.1718354422155; Fri, 14 Jun 2024 01:40:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718354422; cv=pass; d=google.com; s=arc-20160816; b=WOlGSjDYTme0KyiIhiHeoOOYGGkXnfEHlKK4JJY/b8XCzVSW3BYrov5NJcgCAsS2vr lBW8I/aj0f7zJdAX5MruXIGu948eWAp70fT5ao3smTRdIj3t+D1vzVuzwpANRmoF6E7i 3VGe8YJxQ+0j4SHxa7wM0Ey3ibWVyHDh118EKzOYfTNrRbAWm8lGcx7o73hrqnUhtSXW 6u5YuESnAlVTshVNlthrN5ggiy/AFH1KaH+CXlr7e4fDcXNLfRozRng25rRRWKcCrw8f ZgktjbGfSoCwWMBlCaK7I3H5jzEY3Twr7RkAjIcTC4DDeTzYcsAhiQMdg+SoCZwi6gs6 ziTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=tEN7viMJ5j3aehgKMwObJKvDGkUQ8ivpak0HTe06Zb0=; fh=t70TyRV+hOEjDFTNVnQ9tCmm7luQlqAvq+SgV/pLHwI=; b=OAADYWO9nfMX2v5hPenIE64KulFO6J9U4L+rR0Dx/XbK8+1MgTfSeN6d6dm6KrjqdX 3Icv+zxpCRA+KOqa7NjYQyyDoTcnwmBhCIDwMSQTDXgAgdvTvS5umtvLivf4SuyldW4P YGToTG6x/2XnT5FgwLL041XNrd2X16NkmtvoVQyresxoDTwXFXareQ2HynzttDKQ9wGE jrj4RqLH3LsDaet3cQyrx15nQf77HH8jI9RrimN1sE6AkvHF6YKMnwjSwyKEA9v/WE0K wyk+yvtyMsGRkOregwUpfgkkyk4tWMLtN+gzwEZ1zzHtLU/l0I3N0yOCpeLVT42Galui QQgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=UCBixyj5; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-214565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d2118bsi151037866b.96.2024.06.14.01.40.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 01:40:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214565-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=@web.de header.s=s29768273 header.b=UCBixyj5; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-214565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 71EE81F2759A for ; Fri, 14 Jun 2024 08:39:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18468191473; Fri, 14 Jun 2024 08:38:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="UCBixyj5" Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3CC0190076; Fri, 14 Jun 2024 08:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718354304; cv=none; b=k/POQJIIW55lLlq5YBAi24pughg6SnK9ACiiew+nzrUS4ZxXyoVMN7hPTIVG1RnGKq/rEpk58VXCYQqg6nzpyup0LUnCqWsWDqDQ1LmGy84G4Uvb4ZDH49csu8+6qZwqmjVKaAeB4kBNRKUioqhWZ9zimvVox917Vr4e9Pe0tOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718354304; c=relaxed/simple; bh=jhzzQfqKw1hMISbJwFaZUOiev++Tk0+v3bVIiRntaiE=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=rVp5mo+0FND71Bf6USBHW5cjikWTmBy/StxHbA84GQbjd8/IUG0AbsS1UGA13nTgfc8G7MSu9Q3MdEpf8aPQW25+IjVgNSWlf425PoX6T03FfJ9lJZrU8U+mNrXkbJogJOJWNGYxqAgR8HNyY2t8Ir8d01oyCoNBLKAECoMKk/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=UCBixyj5; arc=none smtp.client-ip=212.227.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1718354196; x=1718958996; i=markus.elfring@web.de; bh=tEN7viMJ5j3aehgKMwObJKvDGkUQ8ivpak0HTe06Zb0=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:References: Subject:From:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=UCBixyj5wpF5GgGFSwmalxQQctIhRpiA18Je4F3tDkkWuZZtiUZZrMUXCZPyMOVZ BYZDl3EpPwwD/apF1P25VP9Ot+K2kyLQsaUNIrvXQyRqIlOwyDeh2APn34DkOfBys SIr96xLKx5ejIBZ2mKYVLUfEGwLjwzplWyXuVBcV2qqaKyzmtbFzBGdYnm5eSnwGl 9up3Ikch+oqHIj3d5yJ9fTsVN7xSkTw0ZW9pQ/I4wRSREavOCJmmBv6zIcRLK6R3i ZC0sZGi+QLFDNnlR2nKGYrlV/sUVxn91jET0tkNih/92sP3GHPQ6U6mBFDsfAkyD1 +H7DKcisO4YMufm+og== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MTOha-1roSMR2rm8-00NMNN; Fri, 14 Jun 2024 10:36:35 +0200 Message-ID: Date: Fri, 14 Jun 2024 10:36:11 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Kaiyuan Zhang , Mina Almasry , Willem de Bruijn , netdev@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: LKML , linux-doc@vger.kernel.org, Alexei Starovoitov , Andreas Larsson , Andrii Nakryiko , Arnd Bergmann , Bagas Sanjaya , =?UTF-8?Q?Christian_K=C3=B6nig?= , Christoph Hellwig , Daniel Borkmann , David Ahern , "David S. Miller" , David Wei , Donald Hunter , Eduard Zingerman , Eric Dumazet , Hao Luo , Harshitha Ramamurthy , Helge Deller , Herbert Xu , Ilias Apalodimas , Ivan Kokshaysky , Jakub Kicinski , "James E. J. Bottomley" , Jason Gunthorpe , Jeroen de Borst , Jesper Dangaard Brouer , Jiri Olsa , John Fastabend , Jonathan Corbet , KP Singh , Martin KaFai Lau , Masami Hiramatsu , Mathieu Desnoyers , Matt Turner , Nikolay Aleksandrov , Paolo Abeni , Pavel Begunkov , Praveen Kaligineedi , Richard Henderson , Sergey Shtylyov , Shailend Chand , Shakeel Butt , Shuah Khan , Simon Horman , Song Liu , Stanislav Fomichev , Steffen Klassert , Steven Rostedt , Sumit Semwal , =?UTF-8?Q?Thomas_Bogend=C3=B6rfer?= , Willem de Bruijn , Yonghong Song , Yunsheng Lin References: <20240613013557.1169171-4-almasrymina@google.com> Subject: Re: [PATCH net-next v12 03/13] netdev: support binding dma-buf to netdevice Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240613013557.1169171-4-almasrymina@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:+k1dYnD+EokvOe1vbwZlKNTe1TX0WUdQkgaGG/qsgw+71bzJaIU QidjeMvWeiD+dR5qKEkr1x+LV3+NTDoz+xri6Tx700wOznJ1fcTyqDWN8Zimu67gntD9Pmc /opcmuVaUY3GrrOadwjoget165QeYilWHUurHYshbsEVVlXEFAA4s6i99lnb50QeTC8K9+C Uz8ayCasgXn+9xWrignEw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BWour/0vIC0=;GtGBkBE59JGFyQW5lwppqOQAJBO uUOT/qCm3s5hRQMKWcOgrm418Qdi4TOAZQBmou+I/sOwuv1i0hshrjzqo3MtvwrCL59oveA5C gtnkjHRykPBBeQBxupv6OnToEd23YIvzF+eG9l90ogEgzFGYxS9vNTzIcNhEZma4YGAmX8ITh MRmp2BAbgjuQRBd2F+7RPDHNvybhEmzY8pmyXVK4LJL+qr8DRmTqyiBmz4pmuG1LubCE6e0dW wl/bh5SP42t8LGPBA3IT76V7Ckqi7e/MKnmL2RioijJNeq+h7L3udV4p9KWr3qZmicA2RKscL mqt3OrMpu4uyAHqDvqlsCUpLHPvX5GhhRCFXP/JRyyITzDhcNf0DVERCEURylJJxEwaJG1OsD wopYbRTfG+YokVG8icH2pVI2/uRp2EIRqRuAgOh6DUzPZovh7LBwyj+0ok2hm9VkhWfp2Lp+J TAIv6wXbXHrhubxFbGjdmGSRph4Bow72Z7FscIUZDsTmrsT5ocGItVRpAY+Z8B8i9gU5JHc7o I9JZVHUxLWeKXDVW4EG9dfLtUDNw78xIWH4yTAizE5+UWLA0CWFmjuyDYMxe7gjjQZzPyQ5Gu NETFv6FRokjhiYVoUBKSSWhMFAc7c1YAPuvb/l7/u4oNblimt1rBfyvIV5SyHtCvxFsqlz4Xp RCRtXf7r2iGX1Slo230gSISOxIBvS3BYvNrArD1fT2IuVcntR4VMmwVylu7dRSULhioUKnByW 8t0dfDjUXyACqbKCgOJfWEuAvo6cPVlN18Zof2kowY/767rdYgQam5blW2HRgtvrkfhBhdKzL YhNAMFS5MC9go/S33daoNUGbIZbVyFgs+cN3xErNaBkb0= =E2=80=A6 > +++ b/net/core/netdev-genl.c =E2=80=A6 > int netdev_nl_bind_rx_doit(struct sk_buff *skb, struct genl_info *info) > { =E2=80=A6 > + rtnl_lock(); > + > + netdev =3D __dev_get_by_index(genl_info_net(info), ifindex); =E2=80=A6 > +err_unlock: > + rtnl_unlock(); > + return err; > } =E2=80=A6 Would you become interested to apply another lock guard? https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#= L124 Will scope-based resource management become more attractive (also for the current source code adjustment)? Regards, Markus