[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202104140357.4sPe46YT-lkp@intel.com>
Date: Wed, 14 Apr 2021 03:34:03 +0800
From: kernel test robot <lkp@...el.com>
To: Ilya Dryomov <idryomov@...il.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: net/ceph/messenger_v1.c:1351:5: warning: stack frame size of 1216
bytes in function 'ceph_con_v1_try_write'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89698becf06d341a700913c3d89ce2a914af69a2
commit: 2f713615ddd9d805b6c5e79c52e0e11af99d2bf1 libceph: move msgr1 protocol implementation to its own file
date: 4 months ago
config: powerpc64-randconfig-r014-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f713615ddd9d805b6c5e79c52e0e11af99d2bf1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2f713615ddd9d805b6c5e79c52e0e11af99d2bf1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:12:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:14:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:16:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:18:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/ceph/messenger_v1.c:8:
In file included from include/net/sock.h:38:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/ceph/messenger_v1.c:1351:5: warning: stack frame size of 1216 bytes in function 'ceph_con_v1_try_write' [-Wframe-larger-than=]
int ceph_con_v1_try_write(struct ceph_connection *con)
^
7 warnings generated.
vim +/ceph_con_v1_try_write +1351 net/ceph/messenger_v1.c
1346
1347 /*
1348 * Write something to the socket. Called in a worker thread when the
1349 * socket appears to be writeable and we have something ready to send.
1350 */
> 1351 int ceph_con_v1_try_write(struct ceph_connection *con)
1352 {
1353 int ret = 1;
1354
1355 dout("try_write start %p state %d\n", con, con->state);
1356 if (con->state != CEPH_CON_S_PREOPEN &&
1357 con->state != CEPH_CON_S_V1_BANNER &&
1358 con->state != CEPH_CON_S_V1_CONNECT_MSG &&
1359 con->state != CEPH_CON_S_OPEN)
1360 return 0;
1361
1362 /* open the socket first? */
1363 if (con->state == CEPH_CON_S_PREOPEN) {
1364 BUG_ON(con->sock);
1365 con->state = CEPH_CON_S_V1_BANNER;
1366
1367 con_out_kvec_reset(con);
1368 prepare_write_banner(con);
1369 prepare_read_banner(con);
1370
1371 BUG_ON(con->in_msg);
1372 con->in_tag = CEPH_MSGR_TAG_READY;
1373 dout("try_write initiating connect on %p new state %d\n",
1374 con, con->state);
1375 ret = ceph_tcp_connect(con);
1376 if (ret < 0) {
1377 con->error_msg = "connect error";
1378 goto out;
1379 }
1380 }
1381
1382 more:
1383 dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);
1384 BUG_ON(!con->sock);
1385
1386 /* kvec data queued? */
1387 if (con->out_kvec_left) {
1388 ret = write_partial_kvec(con);
1389 if (ret <= 0)
1390 goto out;
1391 }
1392 if (con->out_skip) {
1393 ret = write_partial_skip(con);
1394 if (ret <= 0)
1395 goto out;
1396 }
1397
1398 /* msg pages? */
1399 if (con->out_msg) {
1400 if (con->out_msg_done) {
1401 ceph_msg_put(con->out_msg);
1402 con->out_msg = NULL; /* we're done with this one */
1403 goto do_next;
1404 }
1405
1406 ret = write_partial_message_data(con);
1407 if (ret == 1)
1408 goto more; /* we need to send the footer, too! */
1409 if (ret == 0)
1410 goto out;
1411 if (ret < 0) {
1412 dout("try_write write_partial_message_data err %d\n",
1413 ret);
1414 goto out;
1415 }
1416 }
1417
1418 do_next:
1419 if (con->state == CEPH_CON_S_OPEN) {
1420 if (ceph_con_flag_test_and_clear(con,
1421 CEPH_CON_F_KEEPALIVE_PENDING)) {
1422 prepare_write_keepalive(con);
1423 goto more;
1424 }
1425 /* is anything else pending? */
1426 if (!list_empty(&con->out_queue)) {
1427 prepare_write_message(con);
1428 goto more;
1429 }
1430 if (con->in_seq > con->in_seq_acked) {
1431 prepare_write_ack(con);
1432 goto more;
1433 }
1434 }
1435
1436 /* Nothing to do! */
1437 ceph_con_flag_clear(con, CEPH_CON_F_WRITE_PENDING);
1438 dout("try_write nothing else to write.\n");
1439 ret = 0;
1440 out:
1441 dout("try_write done on %p ret %d\n", con, ret);
1442 return ret;
1443 }
1444
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (28703 bytes)
Powered by blists - more mailing lists