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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240812193101.1266625-3-andriy.shevchenko@linux.intel.com>
Date: Mon, 12 Aug 2024 22:29:40 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Cc: Herve Codina <herve.codina@...tlin.com>,
	Matti Vaittinen <mazziesaccount@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 2/2] irqdomain: Remove stray '-' in the IRQ domain name

When domain suffix is not supplied the fwnode case (not irqchip-fwnode)
uses alloc_fwnode_name(). This currently unconditionally adds a
separator. Fix the logic to make it conditional and drop stray '-' in
the IRQ domain name.

Fixes: 1e7c05292531 ("irqdomain: Allow giving name suffix for domain")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 kernel/irq/irqdomain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 18d253e10e87..1acc5308fcb7 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -149,9 +149,9 @@ static int alloc_fwnode_name(struct irq_domain *domain, const struct fwnode_hand
 	char *name;
 
 	if (bus_token == DOMAIN_BUS_ANY)
-		name = kasprintf(GFP_KERNEL, "%pfw-%s", fwnode, suf);
+		name = kasprintf(GFP_KERNEL, "%pfw%s%s", fwnode, sep, suf);
 	else
-		name = kasprintf(GFP_KERNEL, "%pfw-%s%s%d", fwnode, suf, sep, bus_token);
+		name = kasprintf(GFP_KERNEL, "%pfw%s%s-%d", fwnode, sep, suf, bus_token);
 	if (!name)
 		return -ENOMEM;
 
-- 
2.43.0.rc1.1336.g36b5255a03ac


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ