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: <20191204172242.21058-1-trix@redhat.com>
Date:   Wed,  4 Dec 2019 09:22:42 -0800
From:   trix@...hat.com
To:     bigeasy@...utronix.de, tglx@...utronix.de, rostedt@...dmis.org,
        linux-kernel@...r.kernel.org
Cc:     Tom Rix <trix@...hat.com>
Subject: [PATCH RT 5.2] signal: remove noop call to __sigqueue_free

From: Tom Rix <trix@...hat.com>

By inspection, this call does not do anything.

static void __sigqueue_free(struct sigqueue *q)
{
	if (q->flags & SIGQUEUE_PREALLOC)  <-- redundant flag check --+
		return;                                               |
	atomic_dec(&q->user->sigpending);                             |
	free_uid(q->user);                                            |
	kmem_cache_free(sigqueue_cachep, q);                          |
}                                                                     |
                                                                      |
static void sigqueue_free_current(struct sigqueue *q)                 |
{                                                                     |
	struct user_struct *up;                                       |
                                                                      |
	if (q->flags & SIGQUEUE_PREALLOC)  <-- first flag check ------+
		return;                                               |
                                                                      |
	up = q->user;                                                 |
	if (rt_prio(current->normal_prio) && !put_task_cache(current, |
		atomic_dec(&up->sigpending);                          |
		free_uid(up);                                         |
	} else                                                        |
		__sigqueue_free(q);  <--- this call will noop --------+
}

Signed-off-by: Tom Rix <trix@...hat.com>
---
 kernel/signal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 7bf4b399d307..4389cfde3f86 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -486,8 +486,7 @@ static void sigqueue_free_current(struct sigqueue *q)
 	if (rt_prio(current->normal_prio) && !put_task_cache(current, q)) {
 		atomic_dec(&up->sigpending);
 		free_uid(up);
-	} else
-		  __sigqueue_free(q);
+	}
 }
 
 void flush_sigqueue(struct sigpending *queue)
-- 
2.18.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ