From nobody Fri Jul 24 22:17:21 2026 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (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 A278B2E5B1B for ; Wed, 22 Jul 2026 21:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784755167; cv=none; b=EajKGpuoRp63flmscbZ8NQ/4lQxy7J3n70X0sFFxKSiCH8CvQpoUUqoQYoFNED8ciPLhPGRH1xRgnmdtpiuW3GFdr+JCAoy+B4ey6poeMpKm6X9/9K7pk7+KPANgTYHd2EZLjuVeZXIjcO0cBeR3mlYilwGLJMVL8lNvikDEkGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784755167; c=relaxed/simple; bh=ITzolcpIMBuzUOPvnVF4ZBfqeKqYJQMCDmsuVt5zkH4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qk9OhXeIcPQSBec0VyAUhD6iXi0/siOq3ye2Bud9VMjYE5yc8ovXJxU4Xac9MYtLFvxYn87GhpB6mUCJAE63dO+yObkgH82PDDZ4UQk/4laWydTskVGjrWoFQOohsiq8uz2tehyNs+Xd6jSbiGCFS6/H0+fxzlJsJcuAb+AwGSc= 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=OsC9mumT; arc=none smtp.client-ip=209.85.160.172 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OsC9mumT" Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-527e352a167so14285791cf.1 for ; Wed, 22 Jul 2026 14:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784755165; x=1785359965; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=TdcUSi1b3fYRxK7MI3OBkktNKaCV6JTuFcRzmXe076w=; b=OsC9mumTV54CGpc7mU4ubDrR7s9FOwAxwTN3bwFCLm1IOMQVgwEqzz7dT/YnmNs7q6 vktnxSjLKB71Cyp4lzysL3LaBxAVqB5D9uyu/moZcuN5K6dK1Ww18/L106yBmNAS9su5 FZrSVRkPsu1QS5qQXdLnfi4wS9IiDKeZfaL2GigEpfG9orn8DPnVw3k52gRbpHMhfm/e xy1wqzI+Gmem41YVODrbJ/8OoctbsgbR39W4iUbmjHAzPYB38g7wkrVgBG3E0XdzS0d0 mPINlp2iwaKul+K1G7bTd+JPdtVB9Wt6Km5B2XJ+O0d3xpWI6WjxyeBFSsaDOxEufASF 3hAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784755165; x=1785359965; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TdcUSi1b3fYRxK7MI3OBkktNKaCV6JTuFcRzmXe076w=; b=gJB+GEsKxw7jLoj+b/SBiH3IbwXQm0B8wYTF+kPdjxQPqP83JSiq+xm28jSjrc00SQ 6fe1cwo6A3ZTj9mIBc690kFujyYFeWgdMIqwTMRiQBipRPi9UgiYAgvofMFLJORKSdXB bz64zcG3HD82FlFw4hN9uO/BAStCWcvUPFSODp8za5N/eIImu1l0CFIBNNT4/rPdA4KS WZqEMAayw8UJ7U+D1BsQmV1nRtJkamYNnwFYDKwjLBukBfiZ3nsH0sRtat7gYe5/xliC Qq1k+3zm0I0nK0LIAvu9SDmwd66/HpECpKg/6YEz+n6RybsNpKHriXkJZBaBpGwMcdQQ Yi8w== X-Forwarded-Encrypted: i=1; AHgh+Rrt7nAOcsZQi0ciOpgA91zvDv7c8nsbtHWqAdnq43lnbTqLL4whVKnsfOedGm4D1kYjv/h1NQHWsHpdjGk=@vger.kernel.org X-Gm-Message-State: AOJu0Yya8GQ/1oNmX0IcTVncZ10UpLaw3lp1eIqbHPoGsakzw793sljV INw5grtUdcDdMgq7XK/bk3o5Rtm312zRaCOETsxlI3BOrYPprOVLcRMhy3chC0PU X-Gm-Gg: AR+sD11pjkXi2fycbJgGURAz+23i+kaDD0+tCsT6zYlOe4F18aAr5d+1/CgR+bFLSg4 br0PtAiKjvrOtwhrHeCBBs4M20qqIGO2EgP34wg28Ma8fna/yLpx1yPP/XubEqWOPwvJPfjEsLU RpW5zzzwOtaUAy8mcHUlkKQ5torASnMmZdg1cibX2ZMM7ngypFCLMNKzg9usY7qaqpQ4Tv1ZM/J RUddyoGuydCc101dkFw2GY6kb2Pwqyz7i+MzTtO21PNcrqa4sJny03U98E8I5cl3rrtcv22BxDh OJVo73nELgxkDDNfmw6KTTL9b6CavN42tRmhnQepufmbfde6R70dP2zncidC64ve9wzHkqxj8s0 Fd370OZhBnOWNx5q3aw/hOJv8dY8E4L4usWHOw5xi9Ahx0FCQcsRiJIZ4OhepGCukeG/T3aGOwn kcJw== X-Received: by 2002:a05:622a:5145:b0:51a:8c9c:7f41 with SMTP id d75a77b69052e-5283df50a2fmr2223291cf.68.1784755165368; Wed, 22 Jul 2026 14:19:25 -0700 (PDT) Received: from FredPC.lan ([2600:382:311b:26:6a8f:2e2e:9fb1:8d6d]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-527d2e7662bsm22663001cf.18.2026.07.22.14.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 14:19:24 -0700 (PDT) From: Fredric Cover X-Google-Original-From: Fredric Cover To: sfrench@samba.org Cc: pc@manguebit.org, ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com, bharathsm@microsoft.com, linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, Fredric Cover Subject: [PATCH] smb: client: use GFP_KERNEL for registry allocation Date: Wed, 22 Jul 2026 14:18:44 -0700 Message-ID: <20260722211844.123697-1-FredTheDude@proton.me> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Fredric Cover Currently, cifs_get_swn_reg() allocates new registry entries using GFP_ATOMIC. Since we lock a mutex here, this is clearly not an atomic context. Use GFP_KERNEL instead. Also, fix a minor grammatical error in the comment above the function. Signed-off-by: Fredric Cover --- fs/smb/client/cifs_swn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/smb/client/cifs_swn.c b/fs/smb/client/cifs_swn.c index 9951817d0d7f..fe10719e627e 100644 --- a/fs/smb/client/cifs_swn.c +++ b/fs/smb/client/cifs_swn.c @@ -425,7 +425,7 @@ static struct cifs_swn_reg *cifs_find_swn_reg(struct ci= fs_tcon *tcon) =20 /* * Get a registration for the tcon's server and share name, allocating a n= ew one if it does not - * exists + * exist. */ static struct cifs_swn_reg *cifs_get_swn_reg(struct cifs_tcon *tcon) { @@ -443,7 +443,7 @@ static struct cifs_swn_reg *cifs_get_swn_reg(struct cif= s_tcon *tcon) goto unlock; } =20 - reg =3D kmalloc_obj(struct cifs_swn_reg, GFP_ATOMIC); + reg =3D kmalloc_obj(struct cifs_swn_reg, GFP_KERNEL); if (reg =3D=3D NULL) { ret =3D -ENOMEM; goto fail_unlock; @@ -451,7 +451,7 @@ static struct cifs_swn_reg *cifs_get_swn_reg(struct cif= s_tcon *tcon) =20 kref_init(®->ref_count); =20 - reg->id =3D idr_alloc(&cifs_swnreg_idr, reg, 1, 0, GFP_ATOMIC); + reg->id =3D idr_alloc(&cifs_swnreg_idr, reg, 1, 0, GFP_KERNEL); if (reg->id < 0) { cifs_dbg(FYI, "%s: failed to allocate registration id\n", __func__); ret =3D reg->id; --=20 2.53.0