From: Dongliang Mu <mudongliangabcd@gmail.com>
To: alex.aring@gmail.com, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
stefan@datenfreihafen.org,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
syzbot+b80c9959009a9325cdff@syzkaller.appspotmail.com,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Suggestions on how to debug kernel crashes where printk and gdb both does not work
Date: Mon, 14 Jun 2021 21:22:43 +0800 [thread overview]
Message-ID: <CAD-N9QUUCSpZjg5RwdKBNF7xx127E6fUowTZkUhm66C891Fpkg@mail.gmail.com> (raw)
Dear kernel developers,
I was trying to debug the crash - memory leak in hwsim_add_one [1]
recently. However, I encountered a disgusting issue: my breakpoint and
printk/pr_alert in the functions that will be surely executed do not
work. The stack trace is in the following. I wrote this email to ask
for some suggestions on how to debug such cases?
Thanks very much. Looking forward to your reply.
[<ffffffff82b09f12>] kmalloc include/linux/slab.h:556 [inline]
[<ffffffff82b09f12>] kzalloc include/linux/slab.h:686 [inline]
[<ffffffff82b09f12>] hwsim_alloc_edge.constprop.0+0x22/0x80
drivers/net/ieee802154/mac802154_hwsim.c:385
[<ffffffff82b0b0f3>] hwsim_subscribe_all_others
drivers/net/ieee802154/mac802154_hwsim.c:709 [inline]
[<ffffffff82b0b0f3>] hwsim_add_one+0x3b3/0x640
drivers/net/ieee802154/mac802154_hwsim.c:802
[<ffffffff82b0b3c4>] hwsim_probe+0x44/0xd0
drivers/net/ieee802154/mac802154_hwsim.c:848
[<ffffffff82628bf1>] platform_probe+0x81/0x120 drivers/base/platform.c:1447
[<ffffffff82625679>] really_probe+0x159/0x500 drivers/base/dd.c:576
[<ffffffff82625aab>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
[<ffffffff82626325>] device_driver_attach+0x105/0x110 drivers/base/dd.c:1039
[<ffffffff826263d1>] __driver_attach drivers/base/dd.c:1117 [inline]
[<ffffffff826263d1>] __driver_attach+0xa1/0x140 drivers/base/dd.c:1070
[<ffffffff82622459>] bus_for_each_dev+0xa9/0x100 drivers/base/bus.c:305
[<ffffffff826244e0>] bus_add_driver+0x160/0x280 drivers/base/bus.c:622
[<ffffffff82627233>] driver_register+0xc3/0x150 drivers/base/driver.c:171
[<ffffffff874fa3dc>] hwsim_init_module+0xae/0x107
drivers/net/ieee802154/mac802154_hwsim.c:899
[<ffffffff81001083>] do_one_initcall+0x63/0x2e0 init/main.c:1249
[<ffffffff87489873>] do_initcall_level init/main.c:1322 [inline]
[<ffffffff87489873>] do_initcalls init/main.c:1338 [inline]
[<ffffffff87489873>] do_basic_setup init/main.c:1358 [inline]
[<ffffffff87489873>] kernel_init_freeable+0x1f4/0x26e init/main.c:1560
[<ffffffff84359255>] kernel_init+0xc/0x1a7 init/main.c:1447
[<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
[1] https://groups.google.com/g/syzkaller-bugs/c/iEEZ_UOvoEY/m/6sm4bt6EAgAJ
--
My best regards to you.
No System Is Safe!
Dongliang Mu
next reply other threads:[~2021-06-14 13:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 13:22 Dongliang Mu [this message]
2021-06-14 13:34 ` Suggestions on how to debug kernel crashes where printk and gdb both does not work Pavel Skripkin
2021-06-14 14:19 ` Dongliang Mu
2021-06-14 14:25 ` Pavel Skripkin
2021-06-14 14:40 ` Dongliang Mu
2021-06-14 14:47 ` Pavel Skripkin
2021-06-14 15:04 ` Dongliang Mu
2021-06-14 20:30 ` Pavel Skripkin
2021-06-15 10:37 ` Dongliang Mu
2021-06-15 13:34 ` Pavel Skripkin
2021-06-16 2:02 ` Dongliang Mu
2021-06-16 2:11 ` Dongliang Mu
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=CAD-N9QUUCSpZjg5RwdKBNF7xx127E6fUowTZkUhm66C891Fpkg@mail.gmail.com \
--to=mudongliangabcd@gmail.com \
--cc=alex.aring@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
--cc=syzbot+b80c9959009a9325cdff@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;
as well as URLs for NNTP newsgroup(s).