From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+8dbe3133b840c470da0e@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bpf?] [net?] WARNING in sock_map_close (2)
Date: Sat, 24 Aug 2024 19:57:05 +0800 [thread overview]
Message-ID: <20240824115705.1267-1-hdanton@sina.com> (raw)
In-Reply-To: <0000000000001187a706204582bb@google.com>
On Thu, 22 Aug 2024 06:19:27 -0700
> syzbot found the following issue on:
>
> HEAD commit: d785ed945de6 net: wwan: t7xx: PCIe reset rescan
> git tree: net-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12378c33980000
#syz test net-next d785ed945de6
--- x/net/core/sock_map.c
+++ y/net/core/sock_map.c
@@ -178,8 +178,10 @@ static void sock_map_del_link(struct soc
if (verdict_stop)
sk_psock_stop_verdict(sk, psock);
- if (psock->psock_update_sk_prot)
+ if (psock->psock_update_sk_prot) {
psock->psock_update_sk_prot(sk, psock, false);
+ WARN_ON_ONCE(sk->sk_prot->close == sock_map_close);
+ }
write_unlock_bh(&sk->sk_callback_lock);
}
}
@@ -196,10 +198,13 @@ static void sock_map_unref(struct sock *
static int sock_map_init_proto(struct sock *sk, struct sk_psock *psock)
{
+ int rc;
if (!sk->sk_prot->psock_update_sk_prot)
return -EINVAL;
psock->psock_update_sk_prot = sk->sk_prot->psock_update_sk_prot;
- return sk->sk_prot->psock_update_sk_prot(sk, psock, false);
+ rc = sk->sk_prot->psock_update_sk_prot(sk, psock, false);
+ WARN_ON_ONCE(sk->sk_prot->close == sock_map_close);
+ return rc;
}
static struct sk_psock *sock_map_psock_get_checked(struct sock *sk)
--
next prev parent reply other threads:[~2024-08-24 11:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 13:19 [syzbot] [bpf?] [net?] WARNING in sock_map_close (2) syzbot
2024-08-23 10:47 ` Hillf Danton
2024-08-23 11:04 ` syzbot
2024-08-24 7:43 ` Hillf Danton
2024-08-24 8:01 ` syzbot
2024-08-24 10:38 ` Hillf Danton
2024-08-24 10:58 ` syzbot
2024-08-24 11:57 ` Hillf Danton [this message]
2024-08-24 12:16 ` syzbot
2024-08-24 23:34 ` Hillf Danton
2024-08-24 23:51 ` 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=20240824115705.1267-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+8dbe3133b840c470da0e@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