[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202106280638.18tOFxZV-lkp@intel.com>
Date: Mon, 28 Jun 2021 06:32:43 +0800
From: kernel test robot <lkp@...el.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>
Subject: net/qrtr/ns.c:669:13: warning: stack frame size (2176) exceeds limit
(2048) in function 'qrtr_ns_worker'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b4b27b9eed8ebdbf9f3046197d29d733c8c944f3
commit: 082bb94fe18e54cc64026a623d94ed6bc7242a5f net: qrtr: ns: Fix the incorrect usage of rcu_read_lock()
date: 9 months ago
config: powerpc64-randconfig-r034-20210628 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 59558129276098d62046c8cda92240d292cbfb1c)
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=082bb94fe18e54cc64026a623d94ed6bc7242a5f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 082bb94fe18e54cc64026a623d94ed6bc7242a5f
# 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/qrtr/ns.c:11:
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>:36: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/qrtr/ns.c:11:
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>:41: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/qrtr/ns.c:11:
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>:46: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/qrtr/ns.c:11:
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>:51: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/qrtr/ns.c:11:
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>:56: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/qrtr/ns.c:669:13: warning: stack frame size (2176) exceeds limit (2048) in function 'qrtr_ns_worker' [-Wframe-larger-than]
static void qrtr_ns_worker(struct work_struct *work)
^
14 warnings generated.
vim +/qrtr_ns_worker +669 net/qrtr/ns.c
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 668
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 @669 static void qrtr_ns_worker(struct work_struct *work)
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 670 {
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 671 const struct qrtr_ctrl_pkt *pkt;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 672 size_t recv_buf_size = 4096;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 673 struct sockaddr_qrtr sq;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 674 struct msghdr msg = { };
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 675 unsigned int cmd;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 676 ssize_t msglen;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 677 void *recv_buf;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 678 struct kvec iv;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 679 int ret;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 680
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 681 msg.msg_name = (struct sockaddr *)&sq;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 682 msg.msg_namelen = sizeof(sq);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 683
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 684 recv_buf = kzalloc(recv_buf_size, GFP_KERNEL);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 685 if (!recv_buf)
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 686 return;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 687
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 688 for (;;) {
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 689 iv.iov_base = recv_buf;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 690 iv.iov_len = recv_buf_size;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 691
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 692 msglen = kernel_recvmsg(qrtr_ns.sock, &msg, &iv, 1,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 693 iv.iov_len, MSG_DONTWAIT);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 694
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 695 if (msglen == -EAGAIN)
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 696 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 697
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 698 if (msglen < 0) {
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 699 pr_err("error receiving packet: %zd\n", msglen);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 700 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 701 }
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 702
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 703 pkt = recv_buf;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 704 cmd = le32_to_cpu(pkt->cmd);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 705 if (cmd < ARRAY_SIZE(qrtr_ctrl_pkt_strings) &&
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 706 qrtr_ctrl_pkt_strings[cmd])
dfddb54043f0a3 Manivannan Sadhasivam 2020-04-21 707 trace_qrtr_ns_message(qrtr_ctrl_pkt_strings[cmd],
dfddb54043f0a3 Manivannan Sadhasivam 2020-04-21 708 sq.sq_node, sq.sq_port);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 709
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 710 ret = 0;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 711 switch (cmd) {
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 712 case QRTR_TYPE_HELLO:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 713 ret = ctrl_cmd_hello(&sq);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 714 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 715 case QRTR_TYPE_BYE:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 716 ret = ctrl_cmd_bye(&sq);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 717 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 718 case QRTR_TYPE_DEL_CLIENT:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 719 ret = ctrl_cmd_del_client(&sq,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 720 le32_to_cpu(pkt->client.node),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 721 le32_to_cpu(pkt->client.port));
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 722 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 723 case QRTR_TYPE_NEW_SERVER:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 724 ret = ctrl_cmd_new_server(&sq,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 725 le32_to_cpu(pkt->server.service),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 726 le32_to_cpu(pkt->server.instance),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 727 le32_to_cpu(pkt->server.node),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 728 le32_to_cpu(pkt->server.port));
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 729 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 730 case QRTR_TYPE_DEL_SERVER:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 731 ret = ctrl_cmd_del_server(&sq,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 732 le32_to_cpu(pkt->server.service),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 733 le32_to_cpu(pkt->server.instance),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 734 le32_to_cpu(pkt->server.node),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 735 le32_to_cpu(pkt->server.port));
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 736 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 737 case QRTR_TYPE_EXIT:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 738 case QRTR_TYPE_PING:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 739 case QRTR_TYPE_RESUME_TX:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 740 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 741 case QRTR_TYPE_NEW_LOOKUP:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 742 ret = ctrl_cmd_new_lookup(&sq,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 743 le32_to_cpu(pkt->server.service),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 744 le32_to_cpu(pkt->server.instance));
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 745 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 746 case QRTR_TYPE_DEL_LOOKUP:
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 747 ctrl_cmd_del_lookup(&sq,
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 748 le32_to_cpu(pkt->server.service),
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 749 le32_to_cpu(pkt->server.instance));
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 750 break;
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 751 }
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 752
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 753 if (ret < 0)
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 754 pr_err("failed while handling packet from %d:%d",
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 755 sq.sq_node, sq.sq_port);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 756 }
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 757
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 758 kfree(recv_buf);
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 759 }
0c2204a4ad710d Manivannan Sadhasivam 2020-02-20 760
:::::: The code at line 669 was first introduced by commit
:::::: 0c2204a4ad710d95d348ea006f14ba926e842ffd net: qrtr: Migrate nameservice to kernel from userspace
:::::: TO: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
:::::: CC: David S. Miller <davem@...emloft.net>
---
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" (26066 bytes)
Powered by blists - more mailing lists