Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp536118rdb; Thu, 15 Feb 2024 07:39:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXSzaCMmc6KeLnKBg1GP/s4sn1fr+DJcatrSQeIe/mg21+34573FVDy+QzV59jFsmN8EzDBNNOsNQPhmBj7k6UBx4oY5uFH7aKaoqy9w== X-Google-Smtp-Source: AGHT+IGwmD8vzUeB7J2Zv/x9gm4kgTx269iV/e/omWxNcOuGjEQrXM2tFRWqCkFm1fHju+dxaQOX X-Received: by 2002:a17:90a:2d8b:b0:299:147f:e915 with SMTP id p11-20020a17090a2d8b00b00299147fe915mr1397605pjd.9.1708011572799; Thu, 15 Feb 2024 07:39:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708011572; cv=pass; d=google.com; s=arc-20160816; b=rlq3DmwFRm5kqLPEDzQM+GLLDM7O0Ccg3A9q9ydMwIMfLWTt7+7oK/6CZK1YjT1swN Fc1FBSyFHblITuYQOcqLHZv1BifXQ4w9mttVhpVncH0UKz93cXLaj6amrI//tlmwkfDe ibUkej6x0SlDbn81E3tZcRIDSCkbQStuzogY//MlKmZP4Gyq49vXDqP43VOLIc2Yqzws Uvk5xTiXs3JSj/DLji9oFUVLpoKBW9dKOYl+GCJfJt3TVB2Kur162RBO6QdSXcXVY4qP fL8tNxOnEDriklFnW+rDEYs6sAom+i1WTS2RF4sxwRj3mXVG6WVYVvUI3pmDx6F4QxJR 9lCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=iYpBy2pOkbObWUArx2aSecO+YI6aKHJRe0UxQNbEakU=; fh=hf7yt6gAq86lBfLhZUgknSIsFJxesf1c5mfeIKl6aZk=; b=mOWF8iGCZzcrGpD7U6hLkII9JzVVO36OCQnGgNk1NtTWxOaR3hTSAWiLsGDOjbXYHc 4+y27bSb8hkMesVASSKjkUtaKulPLDtJiNYAoht/1w8H1zPtx2iV6iASlVlaUMLIDDWa AbyQZTZ1RD4UzX8t9PdSEdeUVn9A9sV1pkTdEcrZ+PW1dTm3Ki1Cuvm50YaJ3E+Givgs Opvq+0ahzWdfIXwoKhZpMpI/MrXVTmNHK017Z8GC90xdQ+2bBVh4djaCWQ2NIKAd1gf9 bT7APbNFiMz/JcfUAF0LfjZMrfxVUrnfIrxEtku6CFXh1/VFKiKbt9WtwYZyVzFuLdht sLqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CDJn+Zj6; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-67204-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x21-20020a17090a8a9500b002963a4cb9ffsi3200390pjn.87.2024.02.15.07.39.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:39:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67204-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CDJn+Zj6; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-67204-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A9B0128DF33 for ; Thu, 15 Feb 2024 15:37:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B88ED13473E; Thu, 15 Feb 2024 15:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="CDJn+Zj6" Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) (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 A0EA913340F; Thu, 15 Feb 2024 15:36:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.178.240 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011408; cv=none; b=XcULDlBI9gjpIGHGHiI2UTyDbGJZ5ENVSFUdhu9RAHrvM0prp4ArqoNLSI7MwTi7XO2gaWq1Rpet4EJUFiV5Cbrs3ziuv87GpCAB69o4xsqOKDWTUJWWtlUCV0dMVI/BskSR1tehZiAR9Gcq8PuDgh3SViUd8PHIY/RfTgyoLQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011408; c=relaxed/simple; bh=tySSyhctcJeEq9pwA1Mg9ZwgdQxeizWcyX96KTc+4Y8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=HsIzMdoQ53WOvKX++LqMHVgl7ltMx+sGBxmt2lcWTboXJjXlYbVNT+0up1KwYmqFS27giK551eR0ZgBlmvodtAqNrgpT6N2vbsAROtpfWE/IQuDCL+rgxkSVz7RJQVlkRo7wJsvX05ODb/wJSKnDIlCrZDEmKgroZ7JGzJgmVUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=CDJn+Zj6; arc=none smtp.client-ip=217.70.178.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 5D992C8769; Thu, 15 Feb 2024 15:36:39 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 61B34FF804; Thu, 15 Feb 2024 15:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708011390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iYpBy2pOkbObWUArx2aSecO+YI6aKHJRe0UxQNbEakU=; b=CDJn+Zj6JNC+vwzOl7OkOaWZNiubzo69dYM2ZlpacMrYvTUPpdhSBkpnN5Jxbw36gMPJ9s 97aPZ0wgSuOeH8bglwkDO5QG4dOF84AZoKW0cqd6tl53w333SjnG02IwbBGsWNUR/wwYNA llIj8O1Tdq+oKxIi4vwPpUsFKm067gG9hT4bQzDlbJ+xAICW2fxyqpcflppdlTWesGcUQ9 cnpS2d3JkCf+ULAL2zcF3zRe7d2yUXrXdqv8hPtxuayT5kMBbiEotiNLqdpGRBrNE2/zIv pitt5sZ/9KAWUa/Q+QK8V8j9Qr+SraoMXbP19o3BrA9cn35evIfNKR70iCa8GA== From: =?utf-8?q?Alexis_Lothor=C3=A9?= Subject: [PATCH 0/4] wifi: wilc1000: fix RCU usage Date: Thu, 15 Feb 2024 16:36:17 +0100 Message-Id: <20240215-wilc_fix_rcu_usage-v1-0-f610e46c6f82@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAHEvzmUC/x2MXQqAIBAGryL7XKD289BVIiTssxaiQrGC6O4tP Q7MzEMJkZGoUw9FnJx43wRMocgv4zaj5EmYrLa1NpUpL169C3y76LPLaRQDrYafQgBsQxIeESL 803543w90WGXmZAAAAA== To: linux-wireless@vger.kernel.org Cc: Ajay Singh , Claudiu Beznea , Kalle Valo , Thomas Petazzoni , linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= X-Mailer: b4 0.12.4 X-GND-Sasl: alexis.lothore@bootlin.com This small series aims to fix multiple warnings observed when enabling CONFIG_PROVE_RCU_LIST: - add missing locks to create corresponding critical read sections - fix mix between RCU and SRCU API usage While at it, since SRCU API is already in use in the driver, any fix done on RCU usage was also done with the SRCU variant of RCU API. I do not really get why we are using SRCU in this driver instead of classic RCU, as it seems to be done in any other wireless driver. My understanding is that primary SRCU use case is for compatibility with realtime kernel, which needs to be preemptible everywhere. Has the driver been really developped with this constraint in mind ? If you have more details about this, feel free to educate me. To: Cc: Ajay Singh Cc: Claudiu Beznea Cc: Kalle Valo Cc: Thomas Petazzoni Cc: Signed-off-by: Alexis Lothoré --- Ajay Singh (1): wifi: wilc1000: add missing read critical sections around vif list traversal Alexis Lothoré (3): wifi: wilc1000: split deeply nested RCU list traversal in dedicated helper wifi: wilc1000: use SRCU instead of RCU for vif list traversal wifi: wilc1000: fix declarations ordering drivers/net/wireless/microchip/wilc1000/cfg80211.c | 2 +- drivers/net/wireless/microchip/wilc1000/hif.c | 70 ++++++++++++---------- drivers/net/wireless/microchip/wilc1000/netdev.c | 51 +++++++++------- drivers/net/wireless/microchip/wilc1000/netdev.h | 6 ++ drivers/net/wireless/microchip/wilc1000/wlan.c | 2 +- 5 files changed, 75 insertions(+), 56 deletions(-) --- base-commit: f4adde5c2f875c491670bc19f6abae91ae364ed6 change-id: 20240131-wilc_fix_rcu_usage-e60ecdffee25 Best regards, -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com