All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steve French <stfrench@microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [smfrench-smb3:ksmbd-for-next-next 4/4] fs/smb/server/smb2pdu.c:2061: warning: Function parameter or struct member 'is_dir' not described in 'smb2_create_open_flags'
Date: Fri, 5 Jul 2024 02:14:02 +0800	[thread overview]
Message-ID: <202407050244.1nLPnfIn-lkp@intel.com> (raw)

tree:   https://github.com/smfrench/smb3-kernel.git ksmbd-for-next-next
head:   cbd22525a55a8f74c730b254d708f8e92bb8dc53
commit: cbd22525a55a8f74c730b254d708f8e92bb8dc53 [4/4] ksmbd: discard write access to the directory open
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20240705/202407050244.1nLPnfIn-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240705/202407050244.1nLPnfIn-lkp@intel.com/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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407050244.1nLPnfIn-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/smb/server/smb2pdu.c:2061: warning: Function parameter or struct member 'is_dir' not described in 'smb2_create_open_flags'


vim +2061 fs/smb/server/smb2pdu.c

e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2047  
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2048  /**
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2049   * smb2_create_open_flags() - convert smb open flags to unix open flags
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2050   * @file_present:	is file already present
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2051   * @access:		file access flags
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2052   * @disposition:	file disposition flags
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2053   * @may_flags:		set with MAY_ flags
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2054   *
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2055   * Return:      file open flags
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2056   */
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2057  static int smb2_create_open_flags(bool file_present, __le32 access,
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2058  				  __le32 disposition,
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2059  				  int *may_flags,
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2060  				  bool is_dir)
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16 @2061  {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2062  	int oflags = O_NONBLOCK | O_LARGEFILE;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2063  
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2064  	if (is_dir) {
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2065  		access &= ~FILE_WRITE_DESIRE_ACCESS_LE;
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2066  		ksmbd_debug(SMB, "Discard write access to a directory\n");
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2067  	}
cbd22525a55a8f fs/smb/server/smb2pdu.c Hobin Woo    2024-07-04  2068  
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2069  	if (access & FILE_READ_DESIRED_ACCESS_LE &&
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2070  	    access & FILE_WRITE_DESIRE_ACCESS_LE) {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2071  		oflags |= O_RDWR;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2072  		*may_flags = MAY_OPEN | MAY_READ | MAY_WRITE;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2073  	} else if (access & FILE_WRITE_DESIRE_ACCESS_LE) {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2074  		oflags |= O_WRONLY;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2075  		*may_flags = MAY_OPEN | MAY_WRITE;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2076  	} else {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2077  		oflags |= O_RDONLY;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2078  		*may_flags = MAY_OPEN | MAY_READ;
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2079  	}
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2080  
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2081  	if (access == FILE_READ_ATTRIBUTES_LE)
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2082  		oflags |= O_PATH;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2083  
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2084  	if (file_present) {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2085  		switch (disposition & FILE_CREATE_MASK_LE) {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2086  		case FILE_OPEN_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2087  		case FILE_CREATE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2088  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2089  		case FILE_SUPERSEDE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2090  		case FILE_OVERWRITE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2091  		case FILE_OVERWRITE_IF_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2092  			oflags |= O_TRUNC;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2093  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2094  		default:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2095  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2096  		}
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2097  	} else {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2098  		switch (disposition & FILE_CREATE_MASK_LE) {
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2099  		case FILE_SUPERSEDE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2100  		case FILE_CREATE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2101  		case FILE_OPEN_IF_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2102  		case FILE_OVERWRITE_IF_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2103  			oflags |= O_CREAT;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2104  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2105  		case FILE_OPEN_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2106  		case FILE_OVERWRITE_LE:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2107  			oflags &= ~O_CREAT;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2108  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2109  		default:
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2110  			break;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2111  		}
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2112  	}
6c5e36d13e2a33 fs/ksmbd/smb2pdu.c      Hyunchul Lee 2021-06-23  2113  
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2114  	return oflags;
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2115  }
e2f34481b24db2 fs/cifsd/smb2pdu.c      Namjae Jeon  2021-03-16  2116  

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

:::::: TO: Namjae Jeon <namjae.jeon@samsung.com>
:::::: CC: Steve French <stfrench@microsoft.com>

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

                 reply	other threads:[~2024-07-04 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202407050244.1nLPnfIn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=stfrench@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.