From: kernel test robot <lkp@intel.com>
To: Shyam Prasad N <nspmangalore@gmail.com>,
smfrench@gmail.com, bharathsm.hsk@gmail.com, pc@cjr.nz,
tom@talpey.com, linux-cifs@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Shyam Prasad N <sprasad@microsoft.com>
Subject: Re: [PATCH 06/11] cifs: fix sockaddr comparison in iface_cmp
Date: Sat, 11 Mar 2023 12:51:05 +0800 [thread overview]
Message-ID: <202303111213.VsaCo9Ff-lkp@intel.com> (raw)
In-Reply-To: <20230310153211.10982-6-sprasad@microsoft.com>
Hi Shyam,
I love your patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on linus/master v6.3-rc1 next-20230310]
[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/Shyam-Prasad-N/cifs-generate-signkey-for-the-channel-that-s-reconnecting/20230310-234711
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
patch link: https://lore.kernel.org/r/20230310153211.10982-6-sprasad%40microsoft.com
patch subject: [PATCH 06/11] cifs: fix sockaddr comparison in iface_cmp
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20230311/202303111213.VsaCo9Ff-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/799e15f02b7da48acdde0b568eef1deb23aa32ed
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Shyam-Prasad-N/cifs-generate-signkey-for-the-channel-that-s-reconnecting/20230310-234711
git checkout 799e15f02b7da48acdde0b568eef1deb23aa32ed
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/cifs/
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/202303111213.VsaCo9Ff-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/cifs/connect.c:1311:4: error: expected expression
struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr;
^
>> fs/cifs/connect.c:1313:19: error: use of undeclared identifier 'saddr4'; did you mean 'vaddr4'?
return memcmp(&saddr4->sin_addr.s_addr,
^~~~~~
vaddr4
fs/cifs/connect.c:1312:24: note: 'vaddr4' declared here
struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
^
>> fs/cifs/connect.c:1312:24: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
^
fs/cifs/connect.c:1328:4: error: expected expression
struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr;
^
>> fs/cifs/connect.c:1330:19: error: use of undeclared identifier 'saddr6'; did you mean 'vaddr6'?
return memcmp(&saddr6->sin6_addr,
^~~~~~
vaddr6
fs/cifs/connect.c:1329:25: note: 'vaddr6' declared here
struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
^
fs/cifs/connect.c:1329:25: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
^
2 warnings and 4 errors generated.
vim +1311 fs/cifs/connect.c
1291
1292 int
1293 cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs)
1294 {
1295 switch (srcaddr->sa_family) {
1296 case AF_UNSPEC:
1297 switch (rhs->sa_family) {
1298 case AF_UNSPEC:
1299 return 0;
1300 case AF_INET:
1301 case AF_INET6:
1302 return 1;
1303 default:
1304 return -1;
1305 }
1306 case AF_INET: {
1307 switch (rhs->sa_family) {
1308 case AF_UNSPEC:
1309 return -1;
1310 case AF_INET:
> 1311 struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr;
> 1312 struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
> 1313 return memcmp(&saddr4->sin_addr.s_addr,
1314 &vaddr4->sin_addr.s_addr,
1315 sizeof(struct sockaddr_in));
1316 case AF_INET6:
1317 return 1;
1318 default:
1319 return -1;
1320 }
1321 }
1322 case AF_INET6: {
1323 switch (rhs->sa_family) {
1324 case AF_UNSPEC:
1325 case AF_INET:
1326 return -1;
1327 case AF_INET6:
1328 struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr;
1329 struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
> 1330 return memcmp(&saddr6->sin6_addr,
1331 &vaddr6->sin6_addr,
1332 sizeof(struct sockaddr_in6));
1333 default:
1334 return -1;
1335 }
1336 }
1337 default:
1338 return -1; /* don't expect to be here */
1339 }
1340 }
1341
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-03-11 4:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 15:32 [PATCH 01/11] cifs: fix tcon status change after tree connect Shyam Prasad N
2023-03-10 15:32 ` [PATCH 02/11] cifs: generate signkey for the channel that's reconnecting Shyam Prasad N
2023-03-10 15:32 ` [PATCH 03/11] cifs: avoid race conditions with parallel reconnects Shyam Prasad N
2023-03-10 15:32 ` [PATCH 04/11] cifs: serialize channel reconnects Shyam Prasad N
2023-03-10 22:40 ` Steve French
2023-03-10 15:32 ` [PATCH 05/11] cifs: lock chan_lock outside match_session Shyam Prasad N
2023-03-10 15:32 ` [PATCH 06/11] cifs: fix sockaddr comparison in iface_cmp Shyam Prasad N
2023-03-11 4:51 ` kernel test robot [this message]
2023-03-10 15:32 ` [PATCH 07/11] cifs: do not poll server interfaces too regularly Shyam Prasad N
2023-03-10 15:32 ` [PATCH 08/11] cifs: distribute channels across interfaces based on speed Shyam Prasad N
2024-02-27 11:16 ` Jan Čermák
2024-02-27 16:17 ` Shyam Prasad N
2024-02-28 9:22 ` Jan Čermák
2024-03-05 14:56 ` Shyam Prasad N
2024-03-06 15:43 ` Paulo Alcantara
2024-03-11 10:01 ` Jan Čermák
2024-03-11 11:14 ` Shyam Prasad N
2024-03-12 14:20 ` Jan Čermák
2024-03-13 10:45 ` Shyam Prasad N
2024-03-26 14:10 ` Jan Čermák
2023-03-10 15:32 ` [PATCH 09/11] cifs: account for primary channel in the interface list Shyam Prasad N
2023-03-13 5:27 ` kernel test robot
2023-03-10 15:32 ` [PATCH 10/11] cifs: handle when server stops supporting multichannel Shyam Prasad N
2023-03-13 6:09 ` kernel test robot
2023-03-10 15:32 ` [PATCH 11/11] cifs: empty interface list when server doesn't support query interfaces Shyam Prasad N
2023-03-14 22:19 ` [PATCH 01/11] cifs: fix tcon status change after tree connect Paulo Alcantara
2023-03-16 10:57 ` Shyam Prasad N
2023-03-16 20:59 ` Paulo Alcantara
2023-03-17 10:48 ` Shyam Prasad N
2023-03-17 12:35 ` Paulo Alcantara
2023-03-17 18:25 ` Steve French
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=202303111213.VsaCo9Ff-lkp@intel.com \
--to=lkp@intel.com \
--cc=bharathsm.hsk@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nspmangalore@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pc@cjr.nz \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.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.