From: Kuniyuki Iwashima <kuniyu@google.com>
To: syzbot+40bf00346c3fe40f90f2@syzkaller.appspotmail.com
Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
horms@kernel.org, kuba@kernel.org, kuniyu@google.com,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, paul@paul-moore.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [lsm?] [net?] WARNING in kvfree_call_rcu
Date: Tue, 8 Jul 2025 23:17:20 +0000 [thread overview]
Message-ID: <20250708231926.356365-1-kuniyu@google.com> (raw)
In-Reply-To: <686da18a.050a0220.1ffab7.0023.GAE@google.com>
From: syzbot <syzbot+40bf00346c3fe40f90f2@syzkaller.appspotmail.com>
Date: Tue, 08 Jul 2025 15:54:02 -0700
> Hello,
>
> syzbot tried to test the proposed patch but the build/boot failed:
>
> net/smc/af_smc.c:365:3: error: call to undeclared function 'inet_sock_destruct'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>
#syz test
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 3760131f14845..1882bab8e00e7 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -30,6 +30,10 @@
#include <linux/splice.h>
#include <net/sock.h>
+#include <net/inet_common.h>
+#if IS_ENABLED(CONFIG_IPV6)
+#include <net/ipv6.h>
+#endif
#include <net/tcp.h>
#include <net/smc.h>
#include <asm/ioctls.h>
@@ -360,6 +364,16 @@ static void smc_destruct(struct sock *sk)
return;
if (!sock_flag(sk, SOCK_DEAD))
return;
+ switch (sk->sk_family) {
+ case AF_INET:
+ inet_sock_destruct(sk);
+ break;
+#if IS_ENABLED(CONFIG_IPV6)
+ case AF_INET6:
+ inet6_sock_destruct(sk);
+ break;
+#endif
+ }
}
static struct lock_class_key smc_key;
diff --git a/net/smc/smc.h b/net/smc/smc.h
index 78ae10d06ed2e..cc59d0f03e261 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -283,7 +283,10 @@ struct smc_connection {
};
struct smc_sock { /* smc sock container */
- struct sock sk;
+ union {
+ struct sock sk;
+ struct inet_sock icsk_inet;
+ };
#if IS_ENABLED(CONFIG_IPV6)
struct ipv6_pinfo *pinet6;
#endif
next prev parent reply other threads:[~2025-07-08 23:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 22:27 syzbot
2025-07-08 22:41 ` Kuniyuki Iwashima
2025-07-08 22:54 ` syzbot
2025-07-08 23:17 ` Kuniyuki Iwashima [this message]
2025-07-08 23:55 ` syzbot
2025-07-10 16:04 ` Paolo Abeni
2025-07-10 23:09 ` Hillf Danton
2025-07-11 1:38 ` syzbot
2025-07-11 6:11 ` Hillf Danton
2025-07-11 6:31 ` syzbot
2025-07-11 9:32 ` Hillf Danton
2025-07-11 10:40 ` syzbot
2025-07-11 13:04 ` Hillf Danton
2025-07-11 13:39 ` syzbot
2025-07-12 0:20 ` Hillf Danton
2025-07-12 0:49 ` syzbot
2025-07-12 1:54 ` Hillf Danton
2025-07-12 3:13 ` syzbot
2025-07-12 6:07 ` Hillf Danton
2025-07-12 6:26 ` syzbot
2025-07-12 23:54 ` Hillf Danton
2025-07-13 1:05 ` syzbot
2025-07-13 2:38 ` Hillf Danton
2025-07-13 2:59 ` syzbot
2025-07-13 5:10 ` Hillf Danton
2025-07-13 6:23 ` syzbot
2025-07-13 7:38 ` Hillf Danton
2025-07-13 8:04 ` syzbot
2025-07-13 8:43 ` Hillf Danton
2025-07-13 9:09 ` syzbot
2025-07-14 2:36 ` Hillf Danton
2025-07-14 4:33 ` syzbot
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=20250708231926.356365-1-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@paul-moore.com \
--cc=syzbot+40bf00346c3fe40f90f2@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®