Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thiago Becker <tbecker@redhat.com>,
	sfrench@samba.org, linux-cifs@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, pc@cjr.nz, lsahlber@redhat.com,
	sprasad@microsoft.com, tom@talpey.com, trbecker@gmail.com,
	samba-technical@lists.samba.org,
	Thiago Becker <tbecker@redhat.com>
Subject: Re: [PATCH] cifs: sanitize paths in cifs_update_super_prepath.
Date: Wed, 5 Apr 2023 05:34:43 +0800	[thread overview]
Message-ID: <202304050514.TB9sze0P-lkp@intel.com> (raw)
In-Reply-To: <20230404185908.993738-1-tbecker@redhat.com>

Hi Thiago,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cifs/for-next]
[also build test WARNING on linus/master v6.3-rc5 next-20230404]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Thiago-Becker/cifs-sanitize-paths-in-cifs_update_super_prepath/20230405-030114
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
patch link:    https://lore.kernel.org/r/20230404185908.993738-1-tbecker%40redhat.com
patch subject: [PATCH] cifs: sanitize paths in cifs_update_super_prepath.
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20230405/202304050514.TB9sze0P-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/4d179c3f90c01aab96bf6a02f70cc111da39d61c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Thiago-Becker/cifs-sanitize-paths-in-cifs_update_super_prepath/20230405-030114
        git checkout 4d179c3f90c01aab96bf6a02f70cc111da39d61c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304050514.TB9sze0P-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/cifs/fs_context.c:448:7: warning: no previous prototype for 'sanitize_path' [-Wmissing-prototypes]
     448 | char *sanitize_path(char *path, gfp_t gfp)
         |       ^~~~~~~~~~~~~


vim +/sanitize_path +448 fs/cifs/fs_context.c

   438	
   439	/*
   440	 * Remove duplicate path delimiters. Windows is supposed to do that
   441	 * but there are some bugs that prevent rename from working if there are
   442	 * multiple delimiters.
   443	 *
   444	 * Returns a sanitized duplicate of @path. The caller is responsible for
   445	 * cleaning up the original.
   446	 */
   447	#define IS_DELIM(c) ((c) == '/' || (c) == '\\')
 > 448	char *sanitize_path(char *path, gfp_t gfp)
   449	{
   450		char *cursor1 = path, *cursor2 = path;
   451	
   452		/* skip all prepended delimiters */
   453		while (IS_DELIM(*cursor1))
   454			cursor1++;
   455	
   456		/* copy the first letter */
   457		*cursor2 = *cursor1;
   458	
   459		/* copy the remainder... */
   460		while (*(cursor1++)) {
   461			/* ... skipping all duplicated delimiters */
   462			if (IS_DELIM(*cursor1) && IS_DELIM(*cursor2))
   463				continue;
   464			*(++cursor2) = *cursor1;
   465		}
   466	
   467		/* if the last character is a delimiter, skip it */
   468		if (IS_DELIM(*(cursor2 - 1)))
   469			cursor2--;
   470	
   471		*(cursor2) = '\0';
   472		return kstrdup(path, gfp);
   473	}
   474	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-04-04 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 18:59 [PATCH] cifs: sanitize paths in cifs_update_super_prepath Thiago Becker
2023-04-04 19:54 ` Paulo Alcantara
2023-04-04 21:34 ` kernel test robot [this message]
2023-04-04 22:26 ` kernel test robot

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=202304050514.TB9sze0P-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pc@cjr.nz \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tbecker@redhat.com \
    --cc=tom@talpey.com \
    --cc=trbecker@gmail.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