From: syzbot <syzbot+44623300f057a28baf1e@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [net?] [bpf?] general protection fault in __dev_flush
Date: Wed, 24 Jul 2024 04:43:30 -0700 [thread overview]
Message-ID: <00000000000086df45061dfcc91d@google.com> (raw)
In-Reply-To: <0000000000009d1d0a061d91b803@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [net?] [bpf?] general protection fault in __dev_flush
Author: aha310510@gmail.com
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
drivers/net/tun.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 9b24861464bc..9254bca2813d 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1661,7 +1661,6 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
int len, int *skb_xdp)
{
struct page_frag *alloc_frag = ¤t->task_frag;
- struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx;
struct bpf_prog *xdp_prog;
int buflen = SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
char *buf;
@@ -1701,7 +1700,6 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
local_bh_disable();
rcu_read_lock();
- bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx);
xdp_prog = rcu_dereference(tun->xdp_prog);
if (xdp_prog) {
struct xdp_buff xdp;
@@ -1730,14 +1728,12 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
pad = xdp.data - xdp.data_hard_start;
len = xdp.data_end - xdp.data;
}
- bpf_net_ctx_clear(bpf_net_ctx);
rcu_read_unlock();
local_bh_enable();
return __tun_build_skb(tfile, alloc_frag, buf, buflen, len, pad);
out:
- bpf_net_ctx_clear(bpf_net_ctx);
rcu_read_unlock();
local_bh_enable();
return NULL;
@@ -2570,7 +2566,6 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
if (m->msg_controllen == sizeof(struct tun_msg_ctl) &&
ctl && ctl->type == TUN_MSG_PTR) {
- struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx;
struct tun_page tpage;
int n = ctl->num;
int flush = 0, queued = 0;
@@ -2579,7 +2574,6 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
local_bh_disable();
rcu_read_lock();
- bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx);
for (i = 0; i < n; i++) {
xdp = &((struct xdp_buff *)ctl->ptr)[i];
@@ -2594,7 +2588,6 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
if (tfile->napi_enabled && queued > 0)
napi_schedule(&tfile->napi);
- bpf_net_ctx_clear(bpf_net_ctx);
rcu_read_unlock();
local_bh_enable();
--
next prev parent reply other threads:[~2024-07-24 11:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 3:59 [syzbot] [net?] [bpf?] general protection fault in __dev_flush syzbot
2024-07-22 2:59 ` [syzbot] [bpf?] [net?] " syzbot
2024-07-24 15:21 ` [PATCH net] tun: Remove nested call to bpf_net_ctx_set() in do_xdp_generic() Jeongjun Park
2024-07-25 2:43 ` Willem de Bruijn
2024-07-25 4:13 ` Jeongjun Park
2024-07-25 10:44 ` Paolo Abeni
2024-07-25 12:15 ` Jeongjun Park
2024-07-22 10:31 ` [syzbot] Re: [syzbot] [net?] [bpf?] general protection fault in __dev_flush syzbot
2024-07-22 10:31 ` syzbot
2024-07-22 11:40 ` syzbot
2024-07-24 9:39 ` syzbot
2024-07-24 11:43 ` syzbot [this message]
2024-07-24 12:28 ` syzbot
2024-07-24 13:40 ` syzbot
2024-07-24 14:13 ` syzbot
2024-07-25 11:27 ` [syzbot] Re: [PATCH net] tun: Remove nested call to bpf_net_ctx_set() in do_xdp_generic() syzbot
2024-07-25 11:28 ` [syzbot] Re: [syzbot] [net?] [bpf?] general protection fault in __dev_flush syzbot
2024-07-25 21:40 ` [PATCH net] tun: Add missing bpf_net_ctx_clear() in do_xdp_generic() Jeongjun Park
2024-07-26 2:21 ` Jason Wang
2024-07-26 3:03 ` Willem de Bruijn
2024-07-26 14:41 ` Jakub Kicinski
2024-07-27 2:16 ` Jeongjun Park
2024-07-27 2:28 ` Jeongjun Park
2024-07-29 10:08 ` patchwork-bot+netdevbpf
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=00000000000086df45061dfcc91d@google.com \
--to=syzbot+44623300f057a28baf1e@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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