From: "tip-bot2 for Vasileios Almpanis" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vasileios Almpanis <vasilisalmpanis@gmail.com>,
Thomas Gleixner <tglx@kernel.org>,
andrealmeid@igalia.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: locking/futex] futex: Remove unnecessary NULL check before kvfree()
Date: Sun, 05 Jul 2026 12:54:41 -0000 [thread overview]
Message-ID: <178325608151.744054.3593618461487023832.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260630133530.2577832-1-vasilisalmpanis@gmail.com>
The following commit has been merged into the locking/futex branch of tip:
Commit-ID: 4903ab0c83f033424879ba7435668f9ebe14f641
Gitweb: https://git.kernel.org/tip/4903ab0c83f033424879ba7435668f9ebe14f641
Author: Vasileios Almpanis <vasilisalmpanis@gmail.com>
AuthorDate: Tue, 30 Jun 2026 15:35:21 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 05 Jul 2026 14:50:19 +02:00
futex: Remove unnecessary NULL check before kvfree()
The NULL check before kvfree() is unnecessary and triggers a Coccinelle
warning, since kvfree() handles NULL arguments internally.
Reported by ifnullfree.cocci Coccinelle semantic patch script.
Signed-off-by: Vasileios Almpanis <vasilisalmpanis@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://patch.msgid.link/20260630133530.2577832-1-vasilisalmpanis@gmail.com
---
kernel/futex/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index 179b26e..233b926 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1746,8 +1746,7 @@ void futex_hash_free(struct mm_struct *mm)
free_percpu(mm->futex.phash.ref);
kvfree(mm->futex.phash.hash_new);
fph = rcu_dereference_raw(mm->futex.phash.hash);
- if (fph)
- kvfree(fph);
+ kvfree(fph);
}
static bool futex_pivot_pending(struct mm_struct *mm)
prev parent reply other threads:[~2026-07-05 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 13:35 [PATCH 1/1] futex: remove " Vasileios Almpanis
2026-07-01 12:36 ` André Almeida
2026-07-05 12:54 ` tip-bot2 for Vasileios Almpanis [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=178325608151.744054.3593618461487023832.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=andrealmeid@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=vasilisalmpanis@gmail.com \
--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®