From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Zefan Li <lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cgroup/debug: Fix lockdep splat with "%pK" format specifier
Date: Mon, 27 Sep 2021 06:43:36 -1000 [thread overview]
Message-ID: <YVH0uKGGmRjrIlFy@slm.duckdns.org> (raw)
In-Reply-To: <20210927025807.26918-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Hello,
On Sun, Sep 26, 2021 at 10:58:07PM -0400, Waiman Long wrote:
> The lockdep splat is caused by the fact that the debug controller use the
> "%pK" format specifier to print out address of cset's with css_set_lock
> held. Under some circumstances, the use of "%pK" format specifier may
> acquire the selinux_ss.policy_rwlock.
>
> To avoid this possible deadlock scenario, we have to abandon the use of
> the "%pK" format specifier and just use "%p" to always hash the cset
> addresses. The actual cset addresses aren't that important as long as
> they are unique for matching purpose.
Isn't the right thing to do here making the selinux rwlock an irqsafe one?
It's a bit crazy to have printf specifier to have restrictive locking
requirements.
Thanks.
--
tejun
next prev parent reply other threads:[~2021-09-27 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 2:58 [PATCH] cgroup/debug: Fix lockdep splat with "%pK" format specifier Waiman Long
[not found] ` <20210927025807.26918-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-09-27 16:43 ` Tejun Heo [this message]
[not found] ` <YVH0uKGGmRjrIlFy-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2021-09-27 18:17 ` Waiman Long
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=YVH0uKGGmRjrIlFy@slm.duckdns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
--cc=longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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