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: <20241227-padata-store-v1-1-55713a18bced@weissschuh.net>
Date: Fri, 27 Dec 2024 23:32:01 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Steffen Klassert <steffen.klassert@...unet.com>, 
 Daniel Jordan <daniel.m.jordan@...cle.com>, 
 Herbert Xu <herbert@...dor.apana.org.au>, 
 Dan Kruchinin <dkruchinin@....org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH] padata: fix sysfs store callback check

padata_sysfs_store() was copied from padata_sysfs_show() but this check
was not adapted. Today there is no attribute which can fail this
check, but if there is one it may as well be correct.

Fixes: 5e017dc3f8bc ("padata: Added sysfs primitives to padata subsystem")
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
 kernel/padata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/padata.c b/kernel/padata.c
index d51bbc76b2279ca3ba51e5d0b0ea528bf0198374..cf63d9bcf4822ea3e8f923c0e11f49ac2197b706 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -970,7 +970,7 @@ static ssize_t padata_sysfs_store(struct kobject *kobj, struct attribute *attr,
 
 	pinst = kobj2pinst(kobj);
 	pentry = attr2pentry(attr);
-	if (pentry->show)
+	if (pentry->store)
 		ret = pentry->store(pinst, attr, buf, count);
 
 	return ret;

---
base-commit: 8379578b11d5e073792b5db2690faa12effce8e0
change-id: 20241227-padata-store-eac9ea4518a9

Best regards,
-- 
Thomas Weißschuh <linux@...ssschuh.net>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ