[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOQ4uxgtoJk4CWfVEpXQ7p7Qoh6E_XCammcDP2F_vjgDVit0ZA@mail.gmail.com>
Date: Thu, 28 Aug 2025 13:09:44 +0200
From: Amir Goldstein <amir73il@...il.com>
To: André Almeida <andrealmeid@...lia.com>
Cc: Gabriel Krisman Bertazi <krisman@...e.de>, Miklos Szeredi <miklos@...redi.hu>, Theodore Tso <tytso@....edu>,
linux-unionfs@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, kernel-dev@...lia.com
Subject: Re: [PATCH v6 4/9] ovl: Create ovl_casefold() to support casefolded strncmp()
On Wed, Aug 27, 2025 at 10:45 PM André Almeida <andrealmeid@...lia.com> wrote:
>
> Em 26/08/2025 04:19, Amir Goldstein escreveu:
> >
> > Andre,
> >
> > Just noticed this is a bug, should have been if (*dst), but anyway following
> > Gabriel's comments I have made this change in my tree (pending more
> > strict related changes):
> >
> > static int ovl_casefold(struct ovl_readdir_data *rdd, const char *str, int len,
> > char **dst)
> > {
> > const struct qstr qstr = { .name = str, .len = len };
> > char *cf_name;
> > int cf_len;
> >
> > if (!IS_ENABLED(CONFIG_UNICODE) || !rdd->map || is_dot_dotdot(str, len))
> > return 0;
> >
> > cf_name = kmalloc(NAME_MAX, GFP_KERNEL);
> > if (!cf_name) {
> > rdd->err = -ENOMEM;
> > return -ENOMEM;
> > }
> >
> > cf_len = utf8_casefold(rdd->map, &qstr, *dst, NAME_MAX);
>
> The third argument here should be cf_name, not *dst anymore.
oops. fixed in my tree.
Thanks,
Amir.
Powered by blists - more mailing lists