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]
Date:	Tue, 8 May 2012 15:08:45 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Greg KH <greg@...ah.com>
cc:	Kernel development list <linux-kernel@...r.kernel.org>
Subject: [PATCH] device core: fix a copy-paste error

This patch (as1552) fixes a fairly obvious copy-paste error that could
have serious consequences on architectures where sizeof(int) !=
sizeof(unsigned long).

Signed-off-by: Alan Stern <stern@...land.harvard.edu>
CC: <stable@...r.kernel.org>

---

This just caught my eye while I was adding another macro immediately
below DEVICE_INT_ATTR.


 include/linux/device.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: usb-3.4/include/linux/device.h
===================================================================
--- usb-3.4.orig/include/linux/device.h
+++ usb-3.4/include/linux/device.h
@@ -502,7 +502,7 @@ ssize_t device_store_int(struct device *
 		{ __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
 #define DEVICE_INT_ATTR(_name, _mode, _var) \
 	struct dev_ext_attribute dev_attr_##_name = \
-		{ __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
+		{ __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) }
 
 extern int device_create_file(struct device *device,
 			      const struct device_attribute *entry);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ