From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CC9F33F8D9; Sun, 5 Jul 2026 12:54:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783256086; cv=none; b=ullsahOZPren7caRT9DnL/QAZv7hc/q20yYDE3+L4dj7Tl+spBmJKTBkq/2KnSfp8aaLftYQAydJZrePfOrEtYyal+Y0dovUOH7biPFNeqfzhhAQTiuprUn+E3BpidtwuQuDQyLu2Oxg72g3pzzFjRy3KW6XTXPU0irnzZ2eDNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783256086; c=relaxed/simple; bh=5dREoZFO/Y8ikylLKP5a4yQTzZstvKuHLvlg2LGBTu4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=WHOBfviqlyNopqlukcMSsDwi9mpj/yqfnWu2E8zky0x/3J6cfSzcN7SfE/DwVpTYW+6G2OA5r9kDxzlERD5zm2wIHnV18ABJcPdsDQcjwBuccLqAwgxx0LsXZSFt6arbddXwd+jCnS/jL6YlAiz/6pLB+bmNVyJX4WZKFHIvqGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hn8BXuZ9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IKFCvs/7; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hn8BXuZ9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IKFCvs/7" Date: Sun, 05 Jul 2026 12:54:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783256083; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GMuh36cjRA0fOhFBwrrHQe2Oj2yibZvqCqPaSYDZ1jI=; b=hn8BXuZ9sEdGczAmHSOWaA+PkeqqI97rJMCnfNfl/2tKg+nOm7mZgjFntWW10sYNjzEPbv /+5SYhGGt2N5cxPkRtYJD1zsopm0g9Qbn5mDxzYUfpX/gC3Sz0XffMxj0p3PNBwncAQPvW 8cxp/TrPfMJT2obLTFf9shooynQVvvD9KpOn302zABcdy+DJ5RRRC4OQ6T+62vmTJSY+2I OZEWks1+IPZwZDN6kKK2wC0Xu1hVzE30N2aPnozmucJZhWmQ0kPwgqB1GOinC3Ssia9M1v hiioBSbVu5NxdJvVLoxdbAXxiVB3E6AzemQXi/CuvTlC9qY8ddy0JFSWqpixIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783256083; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GMuh36cjRA0fOhFBwrrHQe2Oj2yibZvqCqPaSYDZ1jI=; b=IKFCvs/7+iP3aZV3vf0lfWex1O754iYoxgBlw3Cqw8weaZWDVM2dLbYa52JDTNhX8rcS0O LltYxiY1EroRnmCQ== From: "tip-bot2 for Vasileios Almpanis" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/futex] futex: Remove unnecessary NULL check before kvfree() Cc: Vasileios Almpanis , Thomas Gleixner , andrealmeid@igalia.com, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260630133530.2577832-1-vasilisalmpanis@gmail.com> References: <20260630133530.2577832-1-vasilisalmpanis@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178325608151.744054.3593618461487023832.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/futex branch of tip: Commit-ID: 4903ab0c83f033424879ba7435668f9ebe14f641 Gitweb: https://git.kernel.org/tip/4903ab0c83f033424879ba7435668f9ebe1= 4f641 Author: Vasileios Almpanis AuthorDate: Tue, 30 Jun 2026 15:35:21 +02:00 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner Reviewed-by: Andr=C3=A9 Almeida 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 =3D rcu_dereference_raw(mm->futex.phash.hash); - if (fph) - kvfree(fph); + kvfree(fph); } =20 static bool futex_pivot_pending(struct mm_struct *mm)