From: Peter Zijlstra <peterz@infradead.org>
To: George Stark <gnstark@salutedevices.com>
Cc: mingo@redhat.com, will@kernel.org, longman@redhat.com,
boqun.feng@gmail.com, andriy.shevchenko@linux.intel.com,
jic23@kernel.org, linux-kernel@vger.kernel.org,
kernel@salutedevices.com
Subject: Re: [RFC PATCH 1/1] locking: introduce devm_mutex_init and devm_mutex_destroy
Date: Tue, 28 Nov 2023 17:45:35 +0100 [thread overview]
Message-ID: <20231128164535.GT8262@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20231128000910.73784-1-gnstark@salutedevices.com>
On Tue, Nov 28, 2023 at 03:09:10AM +0300, George Stark wrote:
> Using of devm API leads to certain order of releasing resources.
> So all dependent resources which are not devm-wrapped should be deleted
> with respect to devm-release order. Mutex is one of such objects that
> often is bound to other resources and has no own devm wrapping.
> Since mutex_destroy() actually does nothing in non-debug builds
> frequently calling mutex_destroy() is just ignored which is safe for now
> but wrong formally and can lead to a problem if mutex_destroy() will be
> extended so introduce devm_mutex_init() and devm_mutex_destroy().
>
Aside of the issue raised by Waiman, it is also very undesirable to
introduce EXPORT'ed symbols without a user. Please group this with a
patch that actually makes use of it.
No in-tree users, no export.
prev parent reply other threads:[~2023-11-28 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 0:09 [RFC PATCH 1/1] locking: introduce devm_mutex_init and devm_mutex_destroy George Stark
2023-11-28 1:55 ` Waiman Long
2023-11-28 16:35 ` Andy Shevchenko
2023-12-01 13:43 ` George Stark
2023-11-28 16:45 ` Peter Zijlstra [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=20231128164535.GT8262@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=boqun.feng@gmail.com \
--cc=gnstark@salutedevices.com \
--cc=jic23@kernel.org \
--cc=kernel@salutedevices.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=will@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