Re: [PATCH v6 4/9] ovl: Create ovl_casefold() to support casefolded strncmp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 27, 2025 at 10:45 PM André Almeida <andrealmeid@xxxxxxxxxx> 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.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux