lkml.org 
[lkml]   [2023]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: drivers/nvme/host/tcp.c:835:12: warning: stack frame size (2256) exceeds limit (2048) in 'nvme_tcp_recv_skb'
From


On 7/20/23 06:10, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: bfa3037d828050896ae52f6467b6ca2489ae6fb1
> commit: c2700d2886a87f83f31e0a301de1d2350b52c79b nvme-tcp: send H2CData PDUs based on MAXH2CDATA
> date: 1 year, 5 months ago
> config: riscv-randconfig-r042-20230720 (https://download.01.org/0day-ci/archive/20230720/202307201141.PYWS6ird-lkp@intel.com/config)
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
> reproduce: (https://download.01.org/0day-ci/archive/20230720/202307201141.PYWS6ird-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/202307201141.PYWS6ird-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/nvme/host/tcp.c:835:12: warning: stack frame size (2256) exceeds limit (2048) in 'nvme_tcp_recv_skb' [-Wframe-larger-than]
> 835 | static int nvme_tcp_recv_skb(read_descriptor_t *desc, struct sk_buff *skb,
> | ^
> 1 warning generated.
>
>
> vim +/nvme_tcp_recv_skb +835 drivers/nvme/host/tcp.c
>
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 834
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 @835 static int nvme_tcp_recv_skb(read_descriptor_t *desc, struct sk_buff *skb,
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 836 unsigned int offset, size_t len)
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 837 {
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 838 struct nvme_tcp_queue *queue = desc->arg.data;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 839 size_t consumed = len;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 840 int result;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 841
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 842 while (len) {
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 843 switch (nvme_tcp_recv_state(queue)) {
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 844 case NVME_TCP_RECV_PDU:
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 845 result = nvme_tcp_recv_pdu(queue, skb, &offset, &len);
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 846 break;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 847 case NVME_TCP_RECV_DATA:
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 848 result = nvme_tcp_recv_data(queue, skb, &offset, &len);
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 849 break;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 850 case NVME_TCP_RECV_DDGST:
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 851 result = nvme_tcp_recv_ddgst(queue, skb, &offset, &len);
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 852 break;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 853 default:
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 854 result = -EFAULT;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 855 }
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 856 if (result) {
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 857 dev_err(queue->ctrl->ctrl.device,
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 858 "receive failed: %d\n", result);
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 859 queue->rd_enabled = false;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 860 nvme_tcp_error_recovery(&queue->ctrl->ctrl);
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 861 return result;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 862 }
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 863 }
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 864
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 865 return consumed;
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 866 }
> 3f2304f8c6d6ed Sagi Grimberg 2018-12-03 867
>
> :::::: The code at line 835 was first introduced by commit
> :::::: 3f2304f8c6d6ed97849057bd16fee99e434ca796 nvme-tcp: add NVMe over TCP host driver
>
> :::::: TO: Sagi Grimberg <sagi@lightbitslabs.com>
> :::::: CC: Christoph Hellwig <hch@lst.de>
>

I don't understand how the stack frame size is that big. Looks like a
wrong complaint?

\
 
 \ /
  Last update: 2023-07-24 09:47    [W:0.356 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site