um: vector: Reduce stack usage in vector_eth_configure()
authorTiwei Bie <tiwei.btw@antgroup.com>
Mon, 23 Jun 2025 11:08:29 +0000 (19:08 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Jun 2025 07:28:17 +0000 (09:28 +0200)
commit2d65fc13be85c336c56af7077f08ccd3a3a15a4a
treebf64b05d6cf1890222fdfc62e1b8a1e3c58c06c7
parent8948941276024fcfb08fdb3d678867dc1f7b1c16
um: vector: Reduce stack usage in vector_eth_configure()

When compiling with clang (19.1.7), initializing *vp using a compound
literal may result in excessive stack usage. Fix it by initializing the
required fields of *vp individually.

Without this patch:

$ objdump -d arch/um/drivers/vector_kern.o | ./scripts/checkstack.pl x86_64 0
...
0x0000000000000540 vector_eth_configure [vector_kern.o]:1472
...

With this patch:

$ objdump -d arch/um/drivers/vector_kern.o | ./scripts/checkstack.pl x86_64 0
...
0x0000000000000540 vector_eth_configure [vector_kern.o]:208
...

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506221017.WtB7Usua-lkp@intel.com/
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250623110829.314864-1-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/drivers/vector_kern.c