mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Fredric Cover <fredric.cover.lkernel@gmail.com>,
	Namjae Jeon <linkinjeon@kernel.org>
Cc: ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
	Tom Talpey <tom@talpey.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Bharath SM <bharathsm@microsoft.com>,
	linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Fredric Cover <fredric.cover.lkernel@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] smb: client: convert DFS prefix from cache charset on reconnect
Date: Thu, 26 Nov 2026 09:15:04 -0300	[thread overview]
Message-ID: <200bda64156d7af0cbf6a16b261005f7@manguebit.org> (raw)
In-Reply-To: <20261121030951.1470502-1-fredric.cover.lkernel@gmail.com>

Fredric Cover <fredric.cover.lkernel@gmail.com> writes:

> The DFS referral cache stores paths and target strings in UTF-8
> (cache_cp), whereas cifs_sb->prepath must be encoded in the mount's
> local charset (cifs_sb->local_nls).
>
> When reconnecting a DFS link in tree_connect_dfs_target(),
> dfs_cache_get_tgt_share() returns @prefix in cache_cp, which was
> passed directly to cifs_update_super_prepath(). On mounts using a
> non-UTF-8 iocharset such as iso8859-1, this overwrites
> cifs_sb->prepath with UTF-8 bytes. Subsequent operations then
> re-encode cifs_sb->prepath to UTF-16LE using cifs_sb->local_nls,
> corrupting non-ASCII characters on the wire and causing lookups to
> fail with -ENOENT.
>
> Add dfs_cache_local_path() to convert a path from cache_cp to a
> caller-specified codepage via UTF-16, and use it in a new
> set_super_prepath_from_cache() helper called by
> tree_connect_dfs_target() so cifs_sb->prepath stays in
> cifs_sb->local_nls across reconnects.
> ...

Applied.

      reply	other threads:[~2026-11-26 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  3:09 Fredric Cover
2026-11-26 12:15 ` Paulo Alcantara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200bda64156d7af0cbf6a16b261005f7@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bharathsm@microsoft.com \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=fredric.cover.lkernel@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®