From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 89C8F317173 for ; Wed, 12 Aug 2026 14:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786545029; cv=none; b=nyPfY9rydR1w00T21bIMvPq0U6OicoHETZ+bsX+aDPR77zERiiAFZ0KY/BJdHedsy0a+sC766PkDxGMFT+1ckSTWOdNDQSQgwgvsQdZFNnblOuVc/gEZJ8VBE6Bri5eYbEwK93UED/QS4TVCmVliZHKXmucRrd9lTY8u8kUjycM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786545029; c=relaxed/simple; bh=wcZettSTNfqOlFlLGgZdWldeIxZP1hJuwogqXfpzyUQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KWFwmJGsNOCT8RopdLuOpN9C/qUG0SFSShCeZ9lx7A/mn4UhaJ0z4lm0FumUDDFOyNlo4r5ZznoEYfh8IESj4BA+qY1Mozq4EwhnrH9zBmEShOUEt+1WN2T7Upcm5/jA7awnUKqO3FhWrEOaKpayO+F9xWvaage4agJ9GuQ68ZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blackwall.org; spf=none smtp.mailfrom=blackwall.org; dkim=pass (2048-bit key) header.d=blackwall.org header.i=@blackwall.org header.b=PeCLprZl; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blackwall.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=blackwall.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=blackwall.org header.i=@blackwall.org header.b="PeCLprZl" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c197e7e4e94so190743366b.2 for ; Wed, 12 Aug 2026 07:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall.org; s=google; t=1786545022; x=1787149822; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=yMT7PPQ1ysktkS1cevhGzCC9k5h/+zORJkENpAoJdlM=; b=PeCLprZl8gyFkTyhOYKuMgrdkwtGAmI0/gHeQGEEQZ5FZZ612v8xSUvkY01NPwTSTP zo25TXQj4KHHHfXgcS3Kmyf6f8Wr0yuJh7bNClQJT0ZE89T4NVIpXlCGyYysy9z/Iz6g qvxTrzYuT/w0ZLooNiy/KaJ16UTVrmqX/bQclMkyKWg25XX/BG9p0e42TgWk2iESoykA vAYcWA7ep8N+1JWbboklcvcI2Xyoqa8xS3DGIreK4EV5Ar0kVxNzD29YNS3NgT+2gKBb ErrooJZJW/QDDwIb5j6BcQLIeyolpe8YaRXKkkhLjG48bn7WuW9ToTmsmxRRp+p/f8MJ 3MAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786545022; x=1787149822; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yMT7PPQ1ysktkS1cevhGzCC9k5h/+zORJkENpAoJdlM=; b=hZdXgyz56uI9h+l82LDNLboVU0+N77xPj6Gc2QtV5tsq2aZyZ9XlEfIsEHDSzSwxD+ iZryJHicuxLp1Z7122IizM08mKQ37csAsN8L7A27wyuSeA20RCc/BKmgOayHBgrwAuz+ LOzzkzYHcQOg8/4SNqgnm90xzFhEV2lpGEXMUcRzYostbErV/8XhdsDaW4qAUPgEf3Uc QmcwChqqYjwAJAB/cOsBH0BrrZHYAJMQTq9fzGDLV4L1TDe8DR6Kk927rgcJWzKYaqcA ntIuiw3wzY5oVjZ1QWHEIH9bQ0imVgaN7kp/DXAMnK/ocKvZS//HiWdDT2dHPpRV6h/L Oehg== X-Forwarded-Encrypted: i=1; AHgh+RqYBiKg/Gqr+3N+fWgaiPF9duqVgX6VSYA3YHHelU4BnY/g4Ddfq1v30tvnfh5Bhkw0hEcph+HaRFQmjsA=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/MJBmQXFFyg33LcIEMI659Pojelr9G+Qs+v6Cy9xqhdR8U8Jf eoscsba2LbXKn2TjPlEElrfYbRiFxF0aLEis7DFDKyf2k61l4iXReJaQK70DrqSSTdQ= X-Gm-Gg: AR+sD12X5jX6jNYEE747ve2LnWpwEv5OwUrwEKiT/4mAEMeo/pWUGYpnEw5H2J7Bbef jsZu/e/6NyFct+UkBuocKve+wELVt90tN4y671GYvGDxNeKHrNUCFV+F0MKo5MJvlQCoG/xg01y QY1dXTo2eX6Z/0r5NVwzsJuGO7gZRInraTBUy4M13SkC8xOuu5VbzeHbn5d9Q6J+zN8172SONbJ Gpt/sVMS9XMcpmWmVvdJ+skW/sD/N1jE3Ze9/iwTluScguCN+b9FbrIoNUe6kKrWvcQjvFrlHOk vrhka4VTRSZ6w1eKiXvb9wj/psIdbSyACWfhERV3flP5M+fkwLp8I/F0i8wWhRu/u63YpPINWbJ RDSbETGml/oGuzcLuZGkgteJCXGfyFVAAXaOpyMQq13vOhZhblqzfzvIu/8/gGeQP/MeArOwCAG Zr99Sh/Tp0pgvimC4jJh3Z/WgsUqNQbOGZSR3AOS9w4jZo46c2uto+oQDIvCGRnbbt28XDLQ/Hh rg1TBMc3jZ5AJZeBPC9nGKAJBLvk0k= X-Received: by 2002:a17:907:1905:b0:c20:7557:d986 with SMTP id a640c23a62f3a-c20f2f042a1mr256702766b.13.1786545021983; Wed, 12 Aug 2026 07:30:21 -0700 (PDT) Received: from [192.168.0.161] (78-154-15-182.ip.btc-net.bg. [78.154.15.182]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a3769ad71bsm835132a12.14.2026.08.12.07.30.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 07:30:21 -0700 (PDT) Message-ID: Date: Wed, 12 Aug 2026 17:30:19 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2] net: convert netdev_nl_sock bindings list to xarray Content-Language: en-US, bg To: Shivaji Kant , netdev@vger.kernel.org Cc: praan@google.com, Mina Almasry , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Bobby Eshleman , Stanislav Fomichev , Dragos Tatulea , Kees Cook , David Carlier , Yue Haibing , Daniel Borkmann , David Wei , Maoyi Xie , linux-kernel@vger.kernel.org References: <20260811142958.160088-1-shivajikant@google.com> From: Nikolay Aleksandrov In-Reply-To: <20260811142958.160088-1-shivajikant@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/08/2026 17:29, Shivaji Kant wrote: > netdev_nl_sock previously used a struct list_head bindings to keep > track of active netdev netlink bindings, protected by a per-socket > struct mutex lock (priv->lock). > > Since list modifications and iterations are not concurrency-safe, > priv->lock was introduced to serialize operations on priv->bindings. > However, xarray manages its own internal locking (xa_lock) for store, > erase, and iteration operations. > > Convert bindings in struct netdev_nl_sock from struct list_head to > struct xarray and remove priv->lock. This simplifies the code by > removing explicit mutex locking in netdev_nl_bind_rx_doit(), > netdev_nl_bind_tx_doit(), and socket initialization/teardown functions. > > Reviewed-by: Mina Almasry > Signed-off-by: Shivaji Kant > --- > v1 -> v2: > - Add explicit err_erase_dmabuf_bindings err label in net_devmem_bind_dmabuf() > to align cleanup paths with the rest of the function (feedback from reviewer). > > v1: https://lore.kernel.org/all/20260810065759.3735934-1-shivajikant@google.com/ > > include/net/netdev_netlink.h | 5 ++--- > net/core/devmem.c | 14 +++++++++++--- > net/core/devmem.h | 4 ++-- > net/core/netdev-genl.c | 25 ++++++------------------- > 4 files changed, 21 insertions(+), 27 deletions(-) > Reviewed-by: Nikolay Aleksandrov