mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Davidlohr Bueso" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] locking/mutex: Add killable flavor to guard definitions
Date: Mon, 23 Feb 2026 10:25:04 -0000	[thread overview]
Message-ID: <177184230434.1647592.15445846598842585113.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260217191512.1180151-4-dave@stgolabs.net>

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     50214dc4382055352fb1d7b9779550dabf5059e5
Gitweb:        https://git.kernel.org/tip/50214dc4382055352fb1d7b9779550dabf5059e5
Author:        Davidlohr Bueso <dave@stgolabs.net>
AuthorDate:    Tue, 17 Feb 2026 11:15:12 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 23 Feb 2026 11:19:16 +01:00

locking/mutex: Add killable flavor to guard definitions

The mutex guard family defines _try and _intr variants but is missing
the killable one.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260217191512.1180151-4-dave@stgolabs.net
---
 include/linux/mutex.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index f57d2a9..2f648ee 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -253,6 +253,7 @@ extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock) __cond_a
 DEFINE_LOCK_GUARD_1(mutex, struct mutex, mutex_lock(_T->lock), mutex_unlock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _try, mutex_trylock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _intr, mutex_lock_interruptible(_T->lock), _RET == 0)
+DEFINE_LOCK_GUARD_1_COND(mutex, _kill, mutex_lock_killable(_T->lock), _RET == 0)
 DEFINE_LOCK_GUARD_1(mutex_init, struct mutex, mutex_init(_T->lock), /* */)
 
 DECLARE_LOCK_GUARD_1_ATTRS(mutex,	__acquires(_T), __releases(*(struct mutex **)_T))
@@ -261,6 +262,8 @@ DECLARE_LOCK_GUARD_1_ATTRS(mutex_try,	__acquires(_T), __releases(*(struct mutex 
 #define class_mutex_try_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_try, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_intr,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_intr_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_intr, _T)
+DECLARE_LOCK_GUARD_1_ATTRS(mutex_kill,	__acquires(_T), __releases(*(struct mutex **)_T))
+#define class_mutex_kill_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_kill, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_init,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_init_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_init, _T)
 

      reply	other threads:[~2026-02-23 10:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 19:15 [PATCH -tip 0/3] locking/mutex: Misc fixlets Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
2026-02-19  8:32   ` Peter Zijlstra
2026-02-19 13:25   ` Waiman Long
2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
2026-02-19 13:31   ` Waiman Long
2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions Davidlohr Bueso
2026-02-23 10:25   ` tip-bot2 for Davidlohr Bueso [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=177184230434.1647592.15445846598842585113.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@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

all inboxes | Powered by JetHome®