From: patchwork-bot+netdevbpf@kernel.org
To: Binbin Deng <18983559317@163.com>
Cc: jk@codeconstruct.com.au, matt@codeconstruct.com.au,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dengbinbin21@nudt.edu.cn
Subject: Re: [PATCH net v2] net/mctp: publish the mctp_dev only after it is initialised
Date: Fri, 25 Sep 2026 23:40:04 +0000 [thread overview]
Message-ID: <179037960440.3207107.1869825882080445252.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <729830b8.130.1a0c945579d.Coremail.18983559317@163.com>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 22 Sep 2026 21:19:19 +0800 (CST) you wrote:
> From: Binbin Deng <18983559317@163.com>
>
> mctp_add_dev() links the new mctp_dev into dev->mctp_ptr before mdev->dev
> is assigned, so a reader that picks the device up in that window
> dereferences a net_device pointer that is still NULL:
>
> KASAN: null-ptr-deref in range [0x00000000000000b0-0x00000000000000b7]
> Call Trace:
> <TASK>
> ? __pfx_mctp_sendmsg (./include/linux/sockptr.h:49)
> ? __pfx_mctp_dst_output (net/mctp/route.c:41)
> ? selinux_socket_sendmsg (security/selinux/hooks.c:5278)
> ____sys_sendmsg (net/socket.c:775 (discriminator 1) net/socket.c:790
> (discriminator 1) net/socket.c:2684 (discriminator 1))
> ? __pfx_____sys_sendmsg (net/socket.c:1131)
> ? __pfx_copy_msghdr_from_user (net/socket.c:2590)
> ? update_cfs_rq_load_avg (kernel/sched/fair.c:5478)
> ___sys_sendmsg (net/socket.c:2738)
> ? __pfx____sys_sendmsg (net/socket.c:2625)
> ? perf_event_task_tick (./include/linux/rcupdate.h:838)
> ? sched_tick (kernel/sched/core.c:5818)
> ? clockevents_program_event (kernel/time/clockevents.c:372)
> ? fdget (./include/linux/rcupdate.h:873 fs/file.c:1100)
> __sys_sendmsg (net/socket.c:2770)
> ? __pfx___sys_sendmsg (net/socket.c:2751)
> do_syscall_64 (arch/x86/entry/syscall_64.c:63)
> entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
> </TASK>
>
> [...]
Here is the summary with links:
- [net,v2] net/mctp: publish the mctp_dev only after it is initialised
https://git.kernel.org/netdev/net/c/aadf655e8ea9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-09-25 23:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 13:19 Binbin Deng
2026-09-22 14:22 ` Eric Dumazet
2026-09-25 23:35 ` Jakub Kicinski
2026-09-25 23:40 ` patchwork-bot+netdevbpf [this message]
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=179037960440.3207107.1869825882080445252.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=18983559317@163.com \
--cc=davem@davemloft.net \
--cc=dengbinbin21@nudt.edu.cn \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®