[linux-stable-rc:linux-5.10.y 3189/3969] net/qrtr/ns.c:669:13: warning: stack frame size (2096) exceeds limit (2048) in function 'qrtr_ns_worker'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
head:   65f1995ea1e930674e76c5888b4643581e11434c
commit: 5f2f616343b1d62d26f24316fbfc107ecf0983a9 [3189/3969] linux/compiler-clang.h: define HAVE_BUILTIN_BSWAP*
config: powerpc-randconfig-r035-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=5f2f616343b1d62d26f24316fbfc107ecf0983a9
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.10.y
        git checkout 5f2f616343b1d62d26f24316fbfc107ecf0983a9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from net/qrtr/ns.c:8:
   In file included from include/linux/module.h:12:
   In file included from include/linux/list.h:9:
   In file included from include/linux/kernel.h:12:
   In file included from include/linux/bitops.h:29:
   In file included from arch/powerpc/include/asm/bitops.h:62:
   arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
   #define __lwsync()      __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
           ^
   <built-in>:310:9: note: previous definition is here
   #define __lwsync __builtin_ppc_lwsync
           ^
>> net/qrtr/ns.c:669:13: warning: stack frame size (2096) exceeds limit (2048) in function 'qrtr_ns_worker' [-Wframe-larger-than]
   static void qrtr_ns_worker(struct work_struct *work)
               ^
   2 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@xxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux