From: Peter Zijlstra <peterz@infradead.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, will@kernel.org,
longman@redhat.com, boqun.feng@gmail.com, bvanassche@acm.org
Subject: Re: [PATCH] locking/lockdep: fix null-ptr-deref in check_prev_add()
Date: Fri, 18 Nov 2022 11:17:21 +0100 [thread overview]
Message-ID: <Y3dbsSUwIp8yfT3l@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20221118083102.4011977-1-yangyingliang@huawei.com>
On Fri, Nov 18, 2022 at 04:31:02PM +0800, Yang Yingliang wrote:
> I got a null-ptr-deref report as following:
>
> general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] PREEMPT SMP KASAN PTI
> KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
> CPU: 0 PID: 500 Comm: systemd-udevd Tainted: G W 6.1.0-rc5-00144-gabd8ea84ca72-dirty #1320
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
> RIP: 0010:check_prevs_add+0x2f8/0x2780
> Call Trace:
> <TASK>
> __lock_acquire+0x2ae8/0x3d60
> lock_acquire+0x195/0x4e0
> fs_reclaim_acquire+0x119/0x160
> kmem_cache_alloc_node+0x47/0x310
> __alloc_skb+0x205/0x2d0
> devlink_compat_running_version+0x10b/0x6a0
> dev_ethtool+0x285/0x380
> dev_ioctl+0x16c/0xff0
> sock_do_ioctl+0x1ae/0x220
> sock_ioctl+0x55f/0x600
> __x64_sys_ioctl+0x156/0x1d0
> do_syscall_64+0x37/0x90
> entry_SYSCALL_64_after_hwframe+0x63/0xcd
>
> If in use bit of lock_class is not set, hlock_class() returns NULL,
Why is that a valid premise?
That is; you think it is OK for a held_lock to not have an in-use
lock_class?
I'm thinking there's more to this problem you found.
next prev parent reply other threads:[~2022-11-18 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 8:31 Yang Yingliang
2022-11-18 10:17 ` Peter Zijlstra [this message]
2022-11-18 12:27 ` Yang Yingliang
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=Y3dbsSUwIp8yfT3l@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=boqun.feng@gmail.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=will@kernel.org \
--cc=yangyingliang@huawei.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®