diff mbox series

[net-next] net: stream: fix TCP references when INET is not enabled

Message ID 20201118194438.674-1-rdunlap@infradead.org (mailing list archive)
State Accepted
Commit fc9840fbef0c3740e0fc3640eb8628d70fcb2215
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: stream: fix TCP references when INET is not enabled | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 4769 this patch: 4769
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 5135 this patch: 5135
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Randy Dunlap Nov. 18, 2020, 7:44 p.m. UTC
Fix build of net/core/stream.o when CONFIG_INET is not enabled.
Fixes these build errors (sample):

ld: net/core/stream.o: in function `sk_stream_write_space':
(.text+0x27e): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x29c): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x2ab): undefined reference to `tcp_stream_memory_free'
ld: net/core/stream.o: in function `sk_stream_wait_memory':
(.text+0x5a1): undefined reference to `tcp_stream_memory_free'
ld: (.text+0x5bf): undefined reference to `tcp_stream_memory_free'

Fixes: 1c5f2ced136a ("tcp: avoid indirect call to tcp_stream_memory_free()")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
---
 include/net/sock.h |    5 +++++
 1 file changed, 5 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 20, 2020, 9 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 18 Nov 2020 11:44:38 -0800 you wrote:
> Fix build of net/core/stream.o when CONFIG_INET is not enabled.
> Fixes these build errors (sample):
> 
> ld: net/core/stream.o: in function `sk_stream_write_space':
> (.text+0x27e): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x29c): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x2ab): undefined reference to `tcp_stream_memory_free'
> ld: net/core/stream.o: in function `sk_stream_wait_memory':
> (.text+0x5a1): undefined reference to `tcp_stream_memory_free'
> ld: (.text+0x5bf): undefined reference to `tcp_stream_memory_free'
> 
> [...]

Here is the summary with links:
  - [net-next] net: stream: fix TCP references when INET is not enabled
    https://git.kernel.org/netdev/net-next/c/fc9840fbef0c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

--- linux-next-20201118.orig/include/net/sock.h
+++ linux-next-20201118/include/net/sock.h
@@ -1271,10 +1271,15 @@  static inline bool __sk_stream_memory_fr
 	if (READ_ONCE(sk->sk_wmem_queued) >= READ_ONCE(sk->sk_sndbuf))
 		return false;
 
+#ifdef CONFIG_INET
 	return sk->sk_prot->stream_memory_free ?
 		INDIRECT_CALL_1(sk->sk_prot->stream_memory_free,
 			        tcp_stream_memory_free,
 				sk, wake) : true;
+#else
+	return sk->sk_prot->stream_memory_free ?
+		sk->sk_prot->stream_memory_free(sk, wake) : true;
+#endif
 }
 
 static inline bool sk_stream_memory_free(const struct sock *sk)