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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221204031430.662169-1-mawupeng1@huawei.com>
Date:   Sun, 4 Dec 2022 11:14:30 +0800
From:   Wupeng Ma <mawupeng1@...wei.com>
To:     <akpm@...ux-foundation.org>, <tj@...nel.org>, <dennis@...nel.org>,
        <cl@...ux.com>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <mawupeng1@...wei.com>
Subject: [PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc

From: Ma Wupeng <mawupeng1@...wei.com>

Assignment to err if is_atomic is true will never be used since warn
message can only be shown if is_atomic is false after label fail. So drop
it.

Signed-off-by: Ma Wupeng <mawupeng1@...wei.com>
---
 mm/percpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index acd78da0493b..df86d79325b2 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1817,10 +1817,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved,
 
 	spin_unlock_irqrestore(&pcpu_lock, flags);
 
-	if (is_atomic) {
-		err = "atomic alloc failed, no space left";
+	if (is_atomic)
 		goto fail;
-	}
 
 	/* No space left.  Create a new chunk. */
 	if (list_empty(&pcpu_chunk_lists[pcpu_free_slot])) {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ