Skip to contentSkip to conversation

net/core/sock.c:2760:64: error: 'tcp_wfree' undeclared; did you mean 'sock_wfree'?

PATCH kernel test robot 2 participants 2 messages May 14

Subsystems (3)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git main
head:   18dc8e6d15d7a30888beec46a1e01ca0f98508fa
commit: f0de88303d5e7e04a1224bc7a00512b5a1c4fe7a [114/116] net: make is_skb_wmem() available to modules
config: parisc-randconfig-002-20260514 (https://download.01.org/0day-ci/archive/20260514/[email protected]/config)
compiler: hppa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from include/net/inet_sock.h:23,

                    from include/net/ip.h:29,
                    from include/linux/errqueue.h:6,
                    from net/core/sock.c:91:
   include/net/sock.h: In function 'is_skb_wmem':
   include/net/sock.h:1861:63: error: '__sock_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
    1861 |                (IS_ENABLED(CONFIG_INET) && skb->destructor == __sock_wfree) ||
         |                                                               ^~~~~~~~~~~~
         |                                                               sock_wfree
   include/net/sock.h:1861:63: note: each undeclared identifier is reported only once for each function it appears in
   include/net/sock.h:1862:63: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
    1862 |                (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);
         |                                                               ^~~~~~~~~
         |                                                               sock_wfree
   net/core/sock.c: In function 'can_skb_orphan_partial':
>> net/core/sock.c:2760:64: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
    2760 |                 (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree));
         |                                                                ^~~~~~~~~
         |                                                                sock_wfree

vim +2760 net/core/sock.c

9e17f8a475fca81 Eric Dumazet   2015-11-01  2750  
414776621d1006e Jakub Kicinski 2019-08-07  2751  static bool can_skb_orphan_partial(const struct sk_buff *skb)
414776621d1006e Jakub Kicinski 2019-08-07  2752  {
414776621d1006e Jakub Kicinski 2019-08-07  2753  	/* Drivers depend on in-order delivery for crypto offload,
414776621d1006e Jakub Kicinski 2019-08-07  2754  	 * partial orphan breaks out-of-order-OK logic.
414776621d1006e Jakub Kicinski 2019-08-07  2755  	 */
9f06f87fef689d2 Jakub Kicinski 2024-04-03  2756  	if (skb_is_decrypted(skb))
414776621d1006e Jakub Kicinski 2019-08-07  2757  		return false;
9f06f87fef689d2 Jakub Kicinski 2024-04-03  2758  
414776621d1006e Jakub Kicinski 2019-08-07  2759  	return (skb->destructor == sock_wfree ||

414776621d1006e Jakub Kicinski 2019-08-07 @2760 (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree));
414776621d1006e Jakub Kicinski 2019-08-07 2761 } 414776621d1006e Jakub Kicinski 2019-08-07 2762

:::::: The code at line 2760 was first introduced by commit
:::::: 414776621d1006e57e80e6db7fdc3837897aaa64 net/tls: prevent skb_orphan() from leaking TLS plain text with offload

:::::: TO: Jakub Kicinski <[email protected]> :::::: CC: David S. Miller <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#1 lore raw
Quoted 29 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git main
head:   18dc8e6d15d7a30888beec46a1e01ca0f98508fa
commit: f0de88303d5e7e04a1224bc7a00512b5a1c4fe7a [114/116] net: make is_skb_wmem() available to modules
config: parisc-randconfig-002-20260514 (https://download.01.org/0day-ci/archive/20260514/[email protected]/config)
compiler: hppa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from include/net/inet_sock.h:23,

                    from include/net/ip.h:29,
                    from include/linux/errqueue.h:6,
                    from net/core/sock.c:91:
   include/net/sock.h: In function 'is_skb_wmem':
   include/net/sock.h:1861:63: error: '__sock_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
    1861 |                (IS_ENABLED(CONFIG_INET) && skb->destructor == __sock_wfree) ||
         |                                                               ^~~~~~~~~~~~
         |                                                               sock_wfree
   include/net/sock.h:1861:63: note: each undeclared identifier is reported only once for each function it appears in
   include/net/sock.h:1862:63: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
    1862 |                (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);
         |                                                               ^~~~~~~~~
         |                                                               sock_wfree
Quoted 7 lines

net/core/sock.c: In function 'can_skb_orphan_partial':

Quoted 1 line
Quoted 1 line

net/core/sock.c:2760:64: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?

    2760 |                 (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree));
         |                                                                ^~~~~~~~~
         |                                                                sock_wfree

I will send this, because compilers are sometimes a bit strict.

include/net/sock.h +0 -0
index 219917959b54582fdd3d78e8042e1bdfc43decd0..e0263bae8da9870d517e758265047faf96b940d0

100644

include/net/sock.h +0 -0
@@ -1851,10 +1851,9 @@ static inline struct sock *sk_clone_lock(const

struct sock *sk, const gfp_t prio
struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,

                             gfp_t priority);

void sock_wfree(struct sk_buff *skb);
-#ifdef CONFIG_INET
void __sock_wfree(struct sk_buff *skb);
void tcp_wfree(struct sk_buff *skb);
-#endif
+
static inline bool is_skb_wmem(const struct sk_buff *skb)

 {
        return skb->destructor == sock_wfree ||