Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp246265lqe; Wed, 10 Apr 2024 00:11:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZ0RIjPwOZiREJW2iy5p+gSL7eAWt3YS3vfOSPcyhxJIzsT+pCrOq7uK7x47lcVYukEnWjTb/tJwzKMDvU6+qbqrpcLmONEB/M/D7LwA== X-Google-Smtp-Source: AGHT+IHKSa31dkUXEshjL/L5wBmhMZbJd+xY48MVMWNBRjDxqnzc5nR36Mc8UfY9PR3biZ4b+JPM X-Received: by 2002:a05:6a21:3a45:b0:1a9:5b7d:64f2 with SMTP id zu5-20020a056a213a4500b001a95b7d64f2mr1117277pzb.19.1712733071556; Wed, 10 Apr 2024 00:11:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712733071; cv=pass; d=google.com; s=arc-20160816; b=zhwRMcQO2FvuUaHKNX+RRb0ymGU1JWnKnrJNF7zjD8X9qsdbKvbpdYnZvBm+lFWHp3 DqdwCT/TMrjs/qySzexAVKwY73zgqrxPv3tLbkcRy98K939SfVGrp4+tXfY/oxvv1AJC fYGbsAajxRyp3EwBuJxI5AG6wn6B2rY/Ot0jVSqutYq9gG6g4X1KLRTrV3/BNON4cOvm CNFbLSYvFCis38KgMbQYIe6ZaxjlyhydTqIhAaaq0idJIVJdHyPeMGqPaCebVxB/+cD9 zCVGjU1nCluRW4L4bnHr+4VIe5PLz+nYJ3iX9QHIlpL+Uv0mqFxZaQAAW0KXlHUtrUms iRfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=VTpKlPiX2xXwu9MO3vuIvPNbD06SGLmZ+l9rPMuQPG0=; fh=k15yWD4ZltoIGsKlbGcsGeIaHes0BFY8NEK3tQ/9pa0=; b=L3hPLmJ6ZVrSHRivYxXMrcFOgrpd0ixAb8JXrfPKR1TvQYe8IviXP8z6b8NMXXIVvk nFZtSWkihgcZ7NarGmGEK1xSvjxlyRetUsd+CzwLEE/DVhz6OS6kznrMmfiegPNB1Hpx MUAj+QLgPVoTA9KPLMAhwkCoC6RyoU8p/hQRqek4KyubgpArLXPIlumtmG1u2gHu6TDG bMXw1eyx7zaAoOUp5z4zFupol3MrM64os4egIDkXGbwY/qk4S8HCmuISr7YmhjX/nX5d w95zxDIf1xFod90MxR6FKgjrLSYxMFZVtacVQp9j33+eeZ0o41fxSy5wVvbLyHSJWIlN DbYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GXeR+ESe; 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-wireless+bounces-6065-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6065-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 d15-20020a170902cecf00b001e3c6977a64si9735847plg.143.2024.04.10.00.11.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 00:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6065-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=GXeR+ESe; 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-wireless+bounces-6065-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6065-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 0DF48285A25 for ; Wed, 10 Apr 2024 07:11:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D48913C91D; Wed, 10 Apr 2024 07:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GXeR+ESe" X-Original-To: linux-wireless@vger.kernel.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 A7C6313C903; Wed, 10 Apr 2024 07:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712733062; cv=none; b=o2dl2oL6alUNUgdEckEWECebyoTDWHD+1K6rR/41HqXjwG2T1MNp8GGWHC5bz6fKc6lLGTBL+sRZPVfhG5efbI/SsSv24xUQmUp9HwKvWfcGOzndg/HmdqAQpIuPdjYdEvuT3t2Qn3fp7+4hA4rVuexKu3RH3/yHnMbAM0/tTv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712733062; c=relaxed/simple; bh=K9ZC8G7osWKKKF8a/tJjhaswJrqEV1KZaFfP5+r+sKU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Yy2drlCaq7lcQ3IL5pyNGbvIFo0OBVHmhbGbgu0Q8oW1uJ6IJ+hSgOx0dihvOer2cQkKs+35QPHOdDgWl0enyahUpd5PMFUjxIBRGEfJ+Y5pOPMsrS8uQ6SgvvE6u8X6tu2CrZ8UcG3cUK5xA4Fdkvgrdj/zyaCvgvP5E+97RKY= 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=GXeR+ESe; arc=none smtp.client-ip=217.70.183.196 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: by mail.gandi.net (Postfix) with ESMTPSA id BDF25E0009; Wed, 10 Apr 2024 07:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712733058; 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: in-reply-to:in-reply-to:references:references; bh=VTpKlPiX2xXwu9MO3vuIvPNbD06SGLmZ+l9rPMuQPG0=; b=GXeR+ESeHRb8pKpN6lH/rpC+NectWzH9cBqp5weIQGX6KVrqk2Xh5v9azE5W48AtJZkr/z TAuCD40sLcBf1+68Ffr6mOTZbgyIvGS7/tlFHX7q+Egm83cJhCQ4k0e6pr5MYuO5ERAYQ6 Oj/+nXzIu7Do/FnL882KNWJHOx3luzicckqeuLdGUToq5NuJ4syf3oHfqoSgB2Z5+j6Xs3 1ovNht1dSHSXsxVWAA9c1X7MgMAMBXju6XACU0NmqSSkVoT4J5rxkfcG4xFghHtRkN8kS6 yAfZpqGNhnKK1E7QVxZOpNeqvtzHnfUUiAsCK8qcYUqzyBd0D4d0FkajzfgXPQ== From: =?utf-8?q?Alexis_Lothor=C3=A9?= Date: Wed, 10 Apr 2024 09:10:33 +0200 Subject: [PATCH 1/2] wifi: wilc1000: set atomic flag on kmemdup in srcu critical section Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240410-wilc_srcu_to_rcu-v1-1-a9ff5b10feaa@bootlin.com> References: <20240410-wilc_srcu_to_rcu-v1-0-a9ff5b10feaa@bootlin.com> In-Reply-To: <20240410-wilc_srcu_to_rcu-v1-0-a9ff5b10feaa@bootlin.com> To: Ajay Singh , Claudiu Beznea , Kalle Valo Cc: Thomas Petazzoni , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= X-Mailer: b4 0.13.0 X-GND-Sasl: alexis.lothore@bootlin.com In order to prepare wilc1000 driver switch from SRCU to RCU, make sure that allocators are provided with the GFP_ATOMIC flag when called in a critical read section. Signed-off-by: Alexis Lothoré --- drivers/net/wireless/microchip/wilc1000/hif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c index f1085ccb7eed..3925ca653e80 100644 --- a/drivers/net/wireless/microchip/wilc1000/hif.c +++ b/drivers/net/wireless/microchip/wilc1000/hif.c @@ -1594,7 +1594,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length) msg->body.net_info.rssi = buffer[8]; msg->body.net_info.mgmt = kmemdup(&buffer[9], msg->body.net_info.frame_len, - GFP_KERNEL); + GFP_ATOMIC); if (!msg->body.net_info.mgmt) { kfree(msg); goto out; -- 2.44.0