From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Christian Brauner <christianvanbrauner@gmail.com>
Subject: [brauner-vfs:work.coredump.socket 11/17] net/socket.c:3606:14: error: use of undeclared identifier 'SOCK_COREDUMP'; did you mean 'SOCK_STREAM'?
Date: Sun, 11 May 2025 23:00:40 +0800 [thread overview]
Message-ID: <202505112251.o8vQJy7U-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git work.coredump.socket
head: a6db84ba07f7137a473dace5a769551ee0ae3415
commit: fae7938dfe0ba5302ee34640a53a85c6305ad99c [11/17] coredump: add coredump socket
config: mips-ci20_defconfig (https://download.01.org/0day-ci/archive/20250511/202505112251.o8vQJy7U-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505112251.o8vQJy7U-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/202505112251.o8vQJy7U-lkp@intel.com/
All errors (new ones prefixed by >>):
>> net/socket.c:3606:14: error: use of undeclared identifier 'SOCK_COREDUMP'; did you mean 'SOCK_STREAM'?
3606 | if (flags & SOCK_COREDUMP)
| ^~~~~~~~~~~~~
| SOCK_STREAM
arch/mips/include/asm/socket.h:31:2: note: 'SOCK_STREAM' declared here
31 | SOCK_STREAM = 2,
| ^
1 error generated.
vim +3606 net/socket.c
3587
3588 /**
3589 * kernel_connect - connect a socket (kernel space)
3590 * @sock: socket
3591 * @addr: address
3592 * @addrlen: address length
3593 * @flags: flags (O_NONBLOCK, ...)
3594 *
3595 * For datagram sockets, @addr is the address to which datagrams are sent
3596 * by default, and the only address from which datagrams are received.
3597 * For stream sockets, attempts to connect to @addr.
3598 * Returns 0 or an error code.
3599 */
3600
3601 int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen,
3602 int flags)
3603 {
3604 struct sockaddr_storage address;
3605
> 3606 if (flags & SOCK_COREDUMP)
3607 memcpy(&address, addr, addrlen + sizeof(sock->sk->sk_cookie));
3608 else
3609 memcpy(&address, addr, addrlen);
3610
3611 return READ_ONCE(sock->ops)->connect(sock, (struct sockaddr *)&address,
3612 addrlen, flags);
3613 }
3614 EXPORT_SYMBOL(kernel_connect);
3615
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-05-11 15:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505112251.o8vQJy7U-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=christianvanbrauner@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox