On Wed, Oct 09, 2019 at 03:31:54PM +0200, philipp.ammann@xxxxxxxxx wrote: > From: Andreas Schneider <asn@xxxxxxxxxxxxxx> [no subject prefix, and maybe use scripts/get_maintainer.pl... ] > > Signed-off-by: Andreas Schneider <asn@xxxxxxxxxxxxxx> > --- > drivers/staging/exfat/exfat_super.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c > index 5f6caee819a6..b63186a67af6 100644 > --- a/drivers/staging/exfat/exfat_super.c > +++ b/drivers/staging/exfat/exfat_super.c > @@ -1300,6 +1300,9 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid, > } > > /* check the validity of directory name in the given new pathname */ > + if (strlen(new_path) >= MAX_NAME_LENGTH) > + return FFS_NAMETOOLONG; > + odd here, AFAIK, namelen should be checked in ->lookup() for many filesystems (why such dentries exist?) and the length can be also gotten by dentry->d_name.len (it's also stable here). Maybe sort out what original problem here is better and not blindly get patches from random github repos... Thanks, Gao Xiang > ret = resolve_path(new_parent_inode, new_path, &newdir, &uni_name); > if (ret) > goto out2; > -- > 2.21.0 >