[android-common:main-16k-gs-shusky-5.15 36/36] fs/ksmbd/misc.c:162: warning: Excess function parameter 'sharepath' description in 'convert_to_nt_pathname'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Hyunchul,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common main-16k-gs-shusky-5.15
head:   3b83adad5dbcce249f6042cc64bf4ae9fddf5262
commit: 265fd1991c1db85fbabaad4946ca0e63e2ae688d [36/36] ksmbd: use LOOKUP_BENEATH to prevent the out of share access
config: i386-buildonly-randconfig-004-20260813 (https://download.01.org/0day-ci/archive/20260814/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260814/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 265fd1991c1d ("ksmbd: use LOOKUP_BENEATH to prevent the out of share access")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   fs/ksmbd/misc.c:30: warning: Function parameter or member 'str' not described in 'match_pattern'
   fs/ksmbd/misc.c:30: warning: Excess function parameter 'string' description in 'match_pattern'
>> fs/ksmbd/misc.c:162: warning: Excess function parameter 'sharepath' description in 'convert_to_nt_pathname'
   fs/ksmbd/misc.c:240: warning: Function parameter or member 'share' not described in 'convert_to_unix_name'
   fs/ksmbd/misc.c:240: warning: Function parameter or member 'name' not described in 'convert_to_unix_name'
   fs/ksmbd/misc.c:240: warning: Excess function parameter 'path' description in 'convert_to_unix_name'
   fs/ksmbd/misc.c:240: warning: Excess function parameter 'tid' description in 'convert_to_unix_name'


vim +162 fs/ksmbd/misc.c

e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  151  
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  152  /**
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  153   * convert_to_nt_pathname() - extract and return windows path string
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  154   *      whose share directory prefix was removed from file path
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  155   * @filename : unix filename
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  156   * @sharepath: share path string
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  157   *
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  158   * Return : windows path string or error
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  159   */
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  160  
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  161  char *convert_to_nt_pathname(char *filename)
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16 @162  {
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  163  	char *ab_pathname;
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  164  
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  165  	if (strlen(filename) == 0) {
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  166  		ab_pathname = kmalloc(2, GFP_KERNEL);
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  167  		ab_pathname[0] = '\\';
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  168  		ab_pathname[1] = '\0';
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  169  	} else {
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  170  		ab_pathname = kstrdup(filename, GFP_KERNEL);
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  171  		if (!ab_pathname)
265fd1991c1db8 fs/ksmbd/misc.c Hyunchul Lee 2021-09-25  172  			return NULL;
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  173  
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  174  		ksmbd_conv_path_to_windows(ab_pathname);
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  175  	}
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  176  	return ab_pathname;
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  177  }
e2f34481b24db2 fs/cifsd/misc.c Namjae Jeon  2021-03-16  178  

:::::: The code at line 162 was first introduced by commit
:::::: e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 cifsd: add server-side procedures for SMB3

:::::: TO: Namjae Jeon <[email protected]>
:::::: CC: Steve French <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.