lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240906101825.177490-1-usama.anjum@collabora.com>
Date: Fri,  6 Sep 2024 15:18:25 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Sven Schnelle <svens@...ux.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
	kernel@...labora.com,
	linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org
Subject: [PATCH] uprobes: remove unneeded condition

The area cannot be NULL as we are getting it through container_of().
Hence there is no need to check its validity. Remove the if condition
and return statement.

Fixes: c67907222c56 ("uprobes: use vm_special_mapping close() functionality")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
 kernel/events/uprobes.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 778f1978538ce..9f864504a7e92 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1474,9 +1474,6 @@ static void uprobe_clear_state(const struct vm_special_mapping *sm, struct vm_ar
 	delayed_uprobe_remove(NULL, vma->vm_mm);
 	mutex_unlock(&delayed_uprobe_lock);
 
-	if (!area)
-		return;
-
 	put_page(area->pages[0]);
 	kfree(area->bitmap);
 	kfree(area);
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ