{"id":2221367,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2221367/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260409095926.905020-8-rajasimandalos@gmail.com/","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.2/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260409095926.905020-8-rajasimandalos@gmail.com>","list_archive_url":null,"date":"2026-04-09T09:59:25","name":"[8/9] smb: client: fix domainauto remount by syncing domainname from session","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"71c8458b3e02b30c0d5b5a7bac339c0d158f0073","submitter":{"id":91740,"url":"http://patchwork.ozlabs.org/api/1.2/people/91740/?format=json","name":"Rajasi Mandal","email":"rajasimandalos@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260409095926.905020-8-rajasimandalos@gmail.com/mbox/","series":[{"id":499267,"url":"http://patchwork.ozlabs.org/api/1.2/series/499267/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=499267","date":"2026-04-09T09:59:18","name":"[1/9] smb: client: block non-reconfigurable option changes on remount","version":1,"mbox":"http://patchwork.ozlabs.org/series/499267/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221367/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221367/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-cifs+bounces-10737-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=XBpknkqL;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10737-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"XBpknkqL\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.181","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frwYZ3wkMz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 20:05:54 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 0979F308B520\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 10:01:51 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 662F33C0628;\n\tThu,  9 Apr 2026 10:00:26 +0000 (UTC)","from mail-pf1-f181.google.com (mail-pf1-f181.google.com\n [209.85.210.181])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EA2D3BFE3B\n\tfor <linux-cifs@vger.kernel.org>; Thu,  9 Apr 2026 10:00:22 +0000 (UTC)","by mail-pf1-f181.google.com with SMTP id\n d2e1a72fcca58-82418b0178cso346213b3a.1\n        for <linux-cifs@vger.kernel.org>;\n Thu, 09 Apr 2026 03:00:22 -0700 (PDT)","from dev-vm-rm.hzz4ddxqtfeetjrh00qlbgyytb.rx.internal.cloudapp.net\n ([20.197.52.255])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82cf9c6b80dsm29113671b3a.42.2026.04.09.03.00.12\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 09 Apr 2026 03:00:15 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775728825; cv=none;\n b=M4KvAMga+Ivep0uR4zOU6fj/aQ0J1XEf9zVZZTTKLb/fISMNf7qE60K27bwDM6jENzRTT+2N6zFSW3zLc8m+HY8CxFO0LSg0Ai0LWmS+z5xGfn0/fr0KBbJ3XuwcLSY2Zu02GaoHbmisWsZqWcuaILGOzRe4OvzbmZ4cU1iDjlg=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775728825; c=relaxed/simple;\n\tbh=6TPnAyyGNUFwf3UwgLYzDntqqy8ykGYMqTD8B/RAEEc=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=QnWSSBiatjgzrVVhqCEqGeQXh9XSyCDwpXA2l+qumaHMHXQdnE8/jxamZiO+DPIKSarI59RWYDxYYKwZ+3LUEWrWZIRDRsob29lMG3LrtnO6aKuP0hVZVXhcSC7Xfk14A4GKd+3VWJ1+kG7LfbGWnMBzMBuSJpGYes0t6ypF+7E=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=XBpknkqL; arc=none smtp.client-ip=209.85.210.181","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775728821; x=1776333621;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=hQbqX/BJZ3dj3vxFVKk5Uqao5a39anh0K88Gy4Lmf+s=;\n        b=XBpknkqL1EMz8B0ARBUGb7ZhVyr8FjluEGMEGoRj8bHAwg0NqsekAdo2JwU9In5d63\n         jIlVJH5FdkXuInk1yO7pVoW2xj+OtBsLg0PV3JRaeZBij+yXqmIXmSq6mWhX6qhofgdK\n         BR+sLGl3NkkZ4i6AFtMu8lP+eF74IAIgbkGsJ7f5d5UKKMh2IAXrmIvv6Pbox3qwIice\n         7EAyDlgUvhq4JNFKCu4/iDK7PVbVUIHV2Gp/P9/DjtEN2xYUCWfIkg9EPM7MXY3MGPVn\n         jvPdX7OuHK+0gaOmzIDnH3P62AinL1dVhytjik6bzEK9sgQq7Xetq6/xa6c2UXxXwr7x\n         MWfw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775728821; x=1776333621;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=hQbqX/BJZ3dj3vxFVKk5Uqao5a39anh0K88Gy4Lmf+s=;\n        b=Dw4wSxg/niFLHH5d0hAKm13dwBviqdEjkdF/bhjd19RBK+EXGrjBFnbyZTrQOCGQbM\n         sOoccDvW4LungA/2Z+t/G1wj9TwNImqgIPmnztmyBM8a6r1J29O3Lux67XALGAxoprZM\n         oTdcqzRYKpNKF7MHeBdhUelzddQSDOCti6deCcUOcJd3HU7ue8Z9+NM7jFFhPMw8iEvK\n         PT7CN+MhA9z/Dl4woCvDiVD1mwJiP3IoOiDK2lm7BrhotuRSWVBEY8OMlDNjy+oLGf/e\n         dfMkmXgH9vuljNmf+S6B6kk/m32vYXUxO+PPmr0bMk7t8e8/2Bx95sDH6wmys7N0O75u\n         D3Iw==","X-Forwarded-Encrypted":"i=1;\n AJvYcCVsY5qo1lwb4XyvpJZXjc6w4D1GK+D/+puDa0uIX0/acwpoilen8FtPySou+x9D6xc598XphRYfdH3e@vger.kernel.org","X-Gm-Message-State":"AOJu0Yz96HXV137/YD6vTyh9Ux+7WL0fuWIyJ4BJ9Bdjue8Shwbzblb9\n\tiCKnf8Xg0pq0z65FAXe/aiGwRzkNs+16euDa4k8GF3N9mmfd9RtcPb3s","X-Gm-Gg":"AeBDiesx4kk+aEZrOoojPB/yx6kQ2h9nZNZdX3XInMyqcdnkMNxty6b/3mHIHt1l1EU\n\tIXDlr4lB3J74w9a/kNns3scwolbI9fKFFdsb465douxha0IIqw8Bi8/RI18ZJxwphiMzXmq0YEz\n\tPPZx1C6sX5bejfltoivMOsX1riMyX0tM/hGmCOLNzGaoxQpsEfd9UMF9LqeTTWXUwmVOcNow9tp\n\tWDFKWa4HLhS0ILXd2Jm2tFqANeKJ/f0lJOqWXDnv7fKAw7RahmJtD5Nz2JlISg2mPvUiKrbfhSZ\n\tEK8HZLxKOUe0+0I84MxTgX+0a987A6dZAVgo4AfDAz+LMXPrZC4kL1fXiwNCvlf2ZQHhNA3W3ED\n\t9bLhFxINFaVmhOoBbzBXUvct5e3AaeTThmhpjZcOfnDRr/f0afIRwaHb8QEgcRW/jTfMMpfiEh5\n\tXavnn5ZVVPMoknti9sc0v3t4fOrXm1NPbBFzyCWSvYTxDTu8DYVNVMjhstmgO0Cx9ASORiLFyk9\n\ty27tKw4zRFTGelppQqps/A=","X-Received":"by 2002:a05:6a00:1ac9:b0:82d:24f:2516 with SMTP id\n d2e1a72fcca58-82d0da2b115mr22230169b3a.11.1775728816262;\n        Thu, 09 Apr 2026 03:00:16 -0700 (PDT)","From":"rajasimandalos@gmail.com","To":"sfrench@samba.org,\n\tlinux-cifs@vger.kernel.org","Cc":"pc@manguebit.org,\n\tronniesahlberg@gmail.com,\n\tsprasad@microsoft.com,\n\ttom@talpey.com,\n\tmetze@samba.org,\n\tbharathsm@microsoft.com,\n\tsamba-technical@lists.samba.org,\n\tlinux-kernel@vger.kernel.org,\n\tRajasi Mandal <rajasimandal@microsoft.com>","Subject":"[PATCH 8/9] smb: client: fix domainauto remount by syncing domainname\n from session","Date":"Thu,  9 Apr 2026 09:59:25 +0000","Message-ID":"<20260409095926.905020-8-rajasimandalos@gmail.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260409095926.905020-1-rajasimandalos@gmail.com>","References":"<20260409095926.905020-1-rajasimandalos@gmail.com>","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"From: Rajasi Mandal <rajasimandal@microsoft.com>\n\nWhen domainauto is used at mount time, ctx->domainname stays NULL\nwhile the server negotiates the actual domain into ses->domainName.\ncifs_show_options() reads ses->domainName and outputs domain=X in\n/proc/mounts.  On remount, libmount re-feeds domain=X, but the\nverify check compares against old ctx->domainname (NULL) and rejects\nthe remount with \"can not change domainname during remount\".\n\nSteps to reproduce:\n\n  1. Mount with domainauto (no explicit domain= option):\n       mount -t cifs //server/share /mnt \\\n         -o username=u,password=p,domainauto\n     At this point ctx->domainname is NULL, but the server populates\n     ses->domainName (e.g. \"CORP\") during session setup.\n\n  2. Bare remount (or any remount):\n       mount -o remount /mnt\n     libmount reads /proc/mounts, sees domain=CORP (output by\n     cifs_show_options() from ses->domainName), and feeds it back\n     to the kernel.  The kernel parses domain=CORP into\n     new_ctx->domainname=\"CORP\", but old ctx->domainname is still\n     NULL.  smb3_verify_reconfigure_ctx() sees the mismatch and\n     rejects the remount.\n\nThis affects any server that populates ses->domainName during session\nsetup (Active Directory domain controllers, Azure Files) when the\nadmin uses domainauto instead of an explicit domain= option.\n\nFix this by syncing ctx->domainname from ses->domainName in\nsmb3_sync_ctx_from_negotiated() before the verify check runs.\n\nSigned-off-by: Rajasi Mandal <rajasimandal@microsoft.com>\n---\n fs/smb/client/fs_context.c | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c\nindex 2be72733ef2e..d804e5da578e 100644\n--- a/fs/smb/client/fs_context.c\n+++ b/fs/smb/client/fs_context.c\n@@ -1232,6 +1232,9 @@ static void smb3_sync_ctx_from_negotiated(struct cifs_sb_info *cifs_sb)\n \t */\n \tctx->ops = server->ops;\n \tctx->vals = server->vals;\n+\t/* /proc/mounts shows domain= from ses->domainName */\n+\tif (tcon->ses->domainName && !ctx->domainname)\n+\t\tctx->domainname = kstrdup(tcon->ses->domainName, GFP_KERNEL);\n }\n \n /*\n","prefixes":["8/9"]}