aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* firmware loader: fix pending_fw_head list corruptionMaxime Bizon2013-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Got the following oops just before reboot: Unable to handle kernel NULL pointer dereference at virtual address 00000000 [<8028d300>] (__list_del_entry+0x44/0xac) [<802e3320>] (__fw_load_abort.part.13+0x1c/0x50) [<802e337c>] (fw_shutdown_notify+0x28/0x50) [<80034f80>] (notifier_call_chain.isra.1+0x5c/0x9c) [<800350ec>] (__blocking_notifier_call_chain+0x44/0x58) [<80035114>] (blocking_notifier_call_chain+0x14/0x18) [<80035d64>] (kernel_restart_prepare+0x14/0x38) [<80035d94>] (kernel_restart+0xc/0x50) The following race condition triggers here: _request_firmware_load() device_create_file(...) kobject_uevent(...) (schedule) (resume) firmware_loading_store(1) firmware_loading_store(0) list_del_init(&buf->pending_list) (schedule) (resume) list_add(&buf->pending_list, &pending_fw_head); wait_for_completion(&buf->completion); causing an oops later when walking pending_list after the firmware has been released. The proposed fix is to move the list_add() before sysfs attribute creation. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Acked-by: Ming Lei <ming.lei@canonical.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/base/memory.c: introduce help macro to_memory_blockGu Zheng2013-08-28
| | | | | | | | | Introduce help macro to_memory_block to hide the conversion(device-->memory_block), just clean up. Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dynamic debug: line queries failing due to uninitialized local variablejbaron@akamai.com2013-08-28
| | | | | | | | | Settings of the form, 'line x module y +p', can fail arbitrarily due to an uninitialized local variable. With this patch results are consistent, as expected. Signed-off-by: Jason Baron <jbaron@akamai.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: sysfs_create_groups returns a value.Greg Kroah-Hartman2013-08-28
| | | | | | | | | When I included the "empty" function for sysfs_create_groups() when CONFIG_SYSFS=n, I forgot to return a value for it, so things blew up the build. This patch fixes that, stupid me. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* debugfs: provide debugfs_create_x64() when disabledJohannes Berg2013-08-28
| | | | | | | | | | | commit 15b0beaa332b3923cc ("Add x64 support to debugfs") added debugfs_create_x64(), but forgot to provide it when debugfs is disabled, causing problems when code tries to use it even then. Provide the appropriate static inline. Cc: Huang Ying <ying.huang@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rbd: convert bus code to use bus_groupsGreg Kroah-Hartman2013-08-28
| | | | | | | | | | | | The bus_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the RBD bus code to use the correct field. Cc: Yehuda Sadeh <yehuda@inktank.com> Cc: Sage Weil <sage@inktank.com> Acked-by: Alex Elder <elder@linaro.org> Cc: <ceph-devel@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* firmware: dcdbas: use binary attribute groupsGreg KH2013-08-28
| | | | | | | | | | | | | | | | | The dcdbas code was "hand rolling" a binary attribute group, which the driver core now supports automatically. So remove the "create the files by hand" logic, and just set the proper field in the attribute group structure, saving lots of code and headache. Cc: Doug Warzecha <Douglas_Warzecha@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -- Doug, I can take this through my driver-core tree if you don't object. drivers/firmware/dcdbas.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-)
* sysfs: add sysfs_create/remove_groups for when SYSFS is not enabledGreg Kroah-Hartman2013-08-27
| | | | | | | We need these functions for when CONFIG_SYSFS=n. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver core: add #include <linux/sysfs.h> to core files.Greg Kroah-Hartman2013-08-27
| | | | | | | This is needed to fix the build on sh systems. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* HID: convert bus code to use dev_groupsGreg Kroah-Hartman2013-08-26
| | | | | | | | | The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the HID bus code to use the correct field. Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Input: serio: convert bus code to use drv_groupsGreg Kroah-Hartman2013-08-25
| | | | | | | | | The drv_attrs field of struct bus_type is going away soon, drv_groups should be used instead. This converts the serio bus code to use the correct field. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Input: gameport: convert bus code to use drv_groupsGreg Kroah-Hartman2013-08-25
| | | | | | | | | The drv_attrs field of struct bus_type is going away soon, drv_groups should be used instead. This converts the gameport bus code to use the correct field. Acked: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver core: firmware: use __ATTR_RW()Greg Kroah-Hartman2013-08-23
| | | | | | | Use __ATTR_RW() instead of __ATTR() to make it more obvious what the type of attribute is being created. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver core: core: use DEVICE_ATTR_ROGreg Kroah-Hartman2013-08-23
| | | | | | | Use DEVICE_ATTR_RO() instead of a "raw" __ATTR macro, making it easier to audit exactly what is going on with the sysfs files. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver core: bus: use DRIVER_ATTR_WO()Greg Kroah-Hartman2013-08-23
| | | | | | | | There are two bus attributes that can better be defined using DRIVER_ATTR_WO(), so convert them to the new macro, making it easier to audit attribute permissions. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver core: create write-only attribute macros for devices and driversGreg Kroah-Hartman2013-08-23
| | | | | | | This creates the macros DRIVER_ATTR_WO() and DEVICE_ATTR_WO() for write-only attributes for drivers and devices. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: create __ATTR_WO()Greg Kroah-Hartman2013-08-23
| | | | | | | This creates the macro __ATTR_WO() for write-only attributes, instead of having to "open define" them. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* driver-core: platform: convert bus code to use dev_groupsGreg Kroah-Hartman2013-08-23
| | | | | | | | The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the platform bus code to use the correct field. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* workqueue: convert bus code to use dev_groupsGreg Kroah-Hartman2013-08-23
| | | | | | | | | The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the workqueue bus code to use the correct field. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* MEI: convert bus code to use dev_groupsGreg Kroah-Hartman2013-08-23
| | | | | | | | | | The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the MEI bus code to use the correct field. Acked-by: Tomas Winkler <tomas.winkler@intel.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: serial: convert bus code to use drv_groupsGreg Kroah-Hartman2013-08-23
| | | | | | | | The drv_attrs field of struct bus_type is going away soon, drv_groups should be used instead. This converts the USB serial bus code to use the correct field. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Kconfig: Remove hotplug enable hints in CONFIG_KEXEC help textsGeert Uytterhoeven2013-08-22
| | | | | | | | | | | | | commit 40b313608ad4ea655addd2ec6cdd106477ae8e15 ("Finally eradicate CONFIG_HOTPLUG") removed remaining references to CONFIG_HOTPLUG, but missed a few plain English references in the CONFIG_KEXEC help texts. Remove them, too. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2781: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2760: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2780: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds28e04: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2433: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2431: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2423: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2413.c: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Cc: Mariusz Bialonczyk <manio@skyboo.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_ds2408: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: slaves: w1_therm: convert to use w1_family_ops.groupsGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | This moves the sysfs file creation/removal to the w1 core by using the .groups field, saving code in the slave driver. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: David Stevenson <david@avoncliff.com> Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Cc: Michael Arndt <michael@scriptkiller.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: add attribute groups to struct w1_family_opsGreg Kroah-Hartman2013-08-22
| | | | | | | | | This lets w1 slave drivers declare an attribute group, and not have to create/destroy sysfs files directly. All w1 slave drivers will be fixed to use this field up in follow-on patches to this one. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: use default attribute groups for w1 slave devicesGreg Kroah-Hartman2013-08-22
| | | | | | | | | As we have 2 sysfs files for the w1 slave devices, let the driver core create / destroy them automatically by setting the default attribute group for them, saving code and housekeeping logic. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: remove race with sysfs file creationGreg Kroah-Hartman2013-08-22
| | | | | | | | | | W1 slave sysfs files are created _after_ userspace is notified that the device has been added to the system. Fix that race by moving the creation/remove of the files to the bus notifier that is there for doing this type of thing. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs.h: remove attr_name() macroGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | Gotta love a macro that doesn't reduce the typing you have to do. Also, only the driver core, and one network driver uses this. The driver core functions will be going away soon, and I'll convert the network driver soon to not need this as well, so delete it for now before anyone else gets some bright ideas and wants to use it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: group.c: fix up kerneldocGreg Kroah-Hartman2013-08-22
| | | | | | | Fix up the wording of sysfs_create/remove_groups() a bit. Reported-by: Anthony Foiani <tkil@scrye.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* acpi: bgrt: fix build error due to attribute changeGreg Kroah-Hartman2013-08-22
| | | | | | | | | | | No need to call sysfs_bin_attr_init, as the attribute is not dynamically created. Also, we renamed the attribute, so this one isn't even valid anymore. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Len Brown <lenb@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: fix up minor coding style issues in sysfs.hGreg Kroah-Hartman2013-08-21
| | | | | | | As long as we are cleaning up sysfs coding style issues, don't forget the main sysfs.h file, so fix up the space issues there as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: sysfs.h: fix coding style issuesGreg Kroah-Hartman2013-08-21
| | | | | | This fixes up the remaining coding style issues in sysfs.h Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: file.c: fix up broken string warningsGreg Kroah-Hartman2013-08-21
| | | | | | | This fixes the coding style warnings in fs/sysfs/file.c for broken strings across lines. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: dir.c: fix up odd do/while indentationGreg Kroah-Hartman2013-08-21
| | | | | | This fixes up the odd do/while after an if statement warning in dir.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: fix up uaccess.h coding style warningsGreg Kroah-Hartman2013-08-21
| | | | | | This fixes the uaccess.h warnings in the sysfs.c files. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: fix up 80 column coding style issuesGreg Kroah-Hartman2013-08-21
| | | | | | This fixes up the 80 column coding style issues in the sysfs .c files. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: fix up space coding style issuesGreg Kroah-Hartman2013-08-21
| | | | | | | This fixes up all of the space-related coding style issues for the sysfs code. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: remove trailing whitespaceGreg Kroah-Hartman2013-08-21
| | | | | | This removes all trailing whitespace errors in the sysfs code. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: fix placement of EXPORT_SYMBOL()Greg Kroah-Hartman2013-08-21
| | | | | | | The export should happen after the function, not at the bottom of the file, so fix that up. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: group: update copyright to add myself and the LFGreg Kroah-Hartman2013-08-21
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: group.c: add kerneldoc for sysfs_remove_groupGreg Kroah-Hartman2013-08-21
| | | | | | | | sysfs_remove_group() never had kerneldoc, so add it, and fix up the kerneldoc for sysfs_remove_groups() which didn't specify the parameters properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* sysfs: group.c: fix up broken string coding styleGreg Kroah-Hartman2013-08-21
| | | | | | | checkpatch complains about the broken string in the file, and it's correct, so fix it up. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>