<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/device.h, branch v3.10.65</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.65</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.65'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-05-01T20:20:04Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2013-05-01T20:20:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-01T20:20:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=251df49db3327c64bf917bfdba94491fde2b4ee0'/>
<id>urn:sha1:251df49db3327c64bf917bfdba94491fde2b4ee0</id>
<content type='text'>
Pull input updates from Dmitry Torokhov:
 "Assorted fixes and cleanups to the existing drivers plus a new driver
  for IMS Passenger Control Unit device they use for ther in-flight
  entertainment system."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (44 commits)
  Input: trackpoint - Optimize trackpoint init to use power-on reset
  Input: apbps2 - convert to devm_ioremap_resource()
  Input: ALPS - use %ph to print buffers
  ARM - shmobile: Armadillo800EVA: Move st1232 reset pin handling
  Input: st1232 - add reset pin handling
  Input: st1232 - convert to devm_* infrastructure
  Input: MT - handle semi-mt devices in core
  Input: adxl34x - use spi_get_drvdata()
  Input: ad7877 - use spi_get_drvdata() and spi_set_drvdata()
  Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata()
  Input: ims-pcu - fix a memory leak on error
  Input: sysrq - supplement reset sequence with timeout functionality
  Input: tegra-kbc - support for defining row/columns based on SoC
  Input: imx_keypad - switch to using managed resources
  Input: arc_ps2 - add support for device tree
  Input: mma8450 - fix signed 12bits to 32bits conversion
  Input: eeti_ts - remove redundant null check
  Input: edt-ft5x06 - remove redundant null check before kfree
  Input: ad714x - add CONFIG_PM_SLEEP to suspend/resume functions
  Input: adxl34x - add CONFIG_PM_SLEEP to suspend/resume functions
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq</title>
<updated>2013-04-30T02:07:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-30T02:07:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46d9be3e5eb01f71fc02653755d970247174b400'/>
<id>urn:sha1:46d9be3e5eb01f71fc02653755d970247174b400</id>
<content type='text'>
Pull workqueue updates from Tejun Heo:
 "A lot of activities on workqueue side this time.  The changes achieve
  the followings.

   - WQ_UNBOUND workqueues - the workqueues which are per-cpu - are
     updated to be able to interface with multiple backend worker pools.
     This involved a lot of churning but the end result seems actually
     neater as unbound workqueues are now a lot closer to per-cpu ones.

   - The ability to interface with multiple backend worker pools are
     used to implement unbound workqueues with custom attributes.
     Currently the supported attributes are the nice level and CPU
     affinity.  It may be expanded to include cgroup association in
     future.  The attributes can be specified either by calling
     apply_workqueue_attrs() or through /sys/bus/workqueue/WQ_NAME/* if
     the workqueue in question is exported through sysfs.

     The backend worker pools are keyed by the actual attributes and
     shared by any workqueues which share the same attributes.  When
     attributes of a workqueue are changed, the workqueue binds to the
     worker pool with the specified attributes while leaving the work
     items which are already executing in its previous worker pools
     alone.

     This allows converting custom worker pool implementations which
     want worker attribute tuning to use workqueues.  The writeback pool
     is already converted in block tree and there are a couple others
     are likely to follow including btrfs io workers.

   - WQ_UNBOUND's ability to bind to multiple worker pools is also used
     to make it NUMA-aware.  Because there's no association between work
     item issuer and the specific worker assigned to execute it, before
     this change, using unbound workqueue led to unnecessary cross-node
     bouncing and it couldn't be helped by autonuma as it requires tasks
     to have implicit node affinity and workers are assigned randomly.

     After these changes, an unbound workqueue now binds to multiple
     NUMA-affine worker pools so that queued work items are executed in
     the same node.  This is turned on by default but can be disabled
     system-wide or for individual workqueues.

     Crypto was requesting NUMA affinity as encrypting data across
     different nodes can contribute noticeable overhead and doing it
     per-cpu was too limiting for certain cases and IO throughput could
     be bottlenecked by one CPU being fully occupied while others have
     idle cycles.

  While the new features required a lot of changes including
  restructuring locking, it didn't complicate the execution paths much.
  The unbound workqueue handling is now closer to per-cpu ones and the
  new features are implemented by simply associating a workqueue with
  different sets of backend worker pools without changing queue,
  execution or flush paths.

  As such, even though the amount of change is very high, I feel
  relatively safe in that it isn't likely to cause subtle issues with
  basic correctness of work item execution and handling.  If something
  is wrong, it's likely to show up as being associated with worker pools
  with the wrong attributes or OOPS while workqueue attributes are being
  changed or during CPU hotplug.

  While this creates more backend worker pools, it doesn't add too many
  more workers unless, of course, there are many workqueues with unique
  combinations of attributes.  Assuming everything else is the same,
  NUMA awareness costs an extra worker pool per NUMA node with online
  CPUs.

  There are also a couple things which are being routed outside the
  workqueue tree.

   - block tree pulled in workqueue for-3.10 so that writeback worker
     pool can be converted to unbound workqueue with sysfs control
     exposed.  This simplifies the code, makes writeback workers
     NUMA-aware and allows tuning nice level and CPU affinity via sysfs.

   - The conversion to workqueue means that there's no 1:1 association
     between a specific worker, which makes writeback folks unhappy as
     they want to be able to tell which filesystem caused a problem from
     backtrace on systems with many filesystems mounted.  This is
     resolved by allowing work items to set debug info string which is
     printed when the task is dumped.  As this change involves unifying
     implementations of dump_stack() and friends in arch codes, it's
     being routed through Andrew's -mm tree."

* 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (84 commits)
  workqueue: use kmem_cache_free() instead of kfree()
  workqueue: avoid false negative WARN_ON() in destroy_workqueue()
  workqueue: update sysfs interface to reflect NUMA awareness and a kernel param to disable NUMA affinity
  workqueue: implement NUMA affinity for unbound workqueues
  workqueue: introduce put_pwq_unlocked()
  workqueue: introduce numa_pwq_tbl_install()
  workqueue: use NUMA-aware allocation for pool_workqueues
  workqueue: break init_and_link_pwq() into two functions and introduce alloc_unbound_pwq()
  workqueue: map an unbound workqueues to multiple per-node pool_workqueues
  workqueue: move hot fields of workqueue_struct to the end
  workqueue: make workqueue-&gt;name[] fixed len
  workqueue: add workqueue-&gt;unbound_attrs
  workqueue: determine NUMA node of workers accourding to the allowed cpumask
  workqueue: drop 'H' from kworker names of unbound worker pools
  workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[]
  workqueue: move pwq_pool_locking outside of get/put_unbound_pool()
  workqueue: fix memory leak in apply_workqueue_attrs()
  workqueue: fix unbound workqueue attrs hashing / comparison
  workqueue: fix race condition in unbound workqueue free path
  workqueue: remove pwq_lock which is no longer used
  ...
</content>
</entry>
<entry>
<title>driver core: handle user namespaces properly with the uid/gid devtmpfs change</title>
<updated>2013-04-11T18:43:29Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-04-11T18:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e4098a3e08783cfd75f9fcdab276dc1d46931da'/>
<id>urn:sha1:4e4098a3e08783cfd75f9fcdab276dc1d46931da</id>
<content type='text'>
Now that devtmpfs is caring about uid/gid, we need to use the correct
internal types so users who have USER_NS enabled will have things work
properly for them.

Thanks to Eric for pointing this out, and the patch review.

Reported-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: add uid and gid to devtmpfs</title>
<updated>2013-04-08T15:21:48Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay@vrfy.org</email>
</author>
<published>2013-04-06T16:56:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c2670e6515cf584810f417db9b00992c8b2d75a'/>
<id>urn:sha1:3c2670e6515cf584810f417db9b00992c8b2d75a</id>
<content type='text'>
Some drivers want to tell userspace what uid and gid should be used for
their device nodes, so allow that information to percolate through the
driver core to userspace in order to make this happen.  This means that
some systems (i.e.  Android and friends) will not need to even run a
udev-like daemon for their device node manager and can just rely in
devtmpfs fully, reducing their footprint even more.

Signed-off-by: Kay Sievers &lt;kay@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v3.9-rc3' into next</title>
<updated>2013-03-18T02:40:50Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2013-03-18T02:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=688d794c4c3f8b08c814381ee2edd3ede5856056'/>
<id>urn:sha1:688d794c4c3f8b08c814381ee2edd3ede5856056</id>
<content type='text'>
Merge with mainline to bring in module_platform_driver_probe() and
devm_ioremap_resource().
</content>
</entry>
<entry>
<title>device: separate all subsys mutexes</title>
<updated>2013-03-13T15:48:28Z</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.cz</email>
</author>
<published>2013-03-12T16:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be871b7e54711479d3b9d3617d49898770830db2'/>
<id>urn:sha1:be871b7e54711479d3b9d3617d49898770830db2</id>
<content type='text'>
ca22e56d (driver-core: implement 'sysdev' functionality for regular
devices and buses) has introduced bus_register macro with a static
key to distinguish different subsys mutex classes.

This however doesn't work for different subsys which use a common
registering function. One example is subsys_system_register (and
mce_device and cpu_device).

In the end this leads to the following lockdep splat:
[  207.271924] ======================================================
[  207.271932] [ INFO: possible circular locking dependency detected ]
[  207.271942] 3.9.0-rc1-0.7-default+ #34 Not tainted
[  207.271948] -------------------------------------------------------
[  207.271957] bash/10493 is trying to acquire lock:
[  207.271963]  (subsys mutex){+.+.+.}, at: [&lt;ffffffff8134af27&gt;] bus_remove_device+0x37/0x1c0
[  207.271987]
[  207.271987] but task is already holding lock:
[  207.271995]  (cpu_hotplug.lock){+.+.+.}, at: [&lt;ffffffff81046ccf&gt;] cpu_hotplug_begin+0x2f/0x60
[  207.272012]
[  207.272012] which lock already depends on the new lock.
[  207.272012]
[  207.272023]
[  207.272023] the existing dependency chain (in reverse order) is:
[  207.272033]
[  207.272033] -&gt; #4 (cpu_hotplug.lock){+.+.+.}:
[  207.272044]        [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.272056]        [&lt;ffffffff814ad807&gt;] mutex_lock_nested+0x37/0x360
[  207.272069]        [&lt;ffffffff81046ba9&gt;] get_online_cpus+0x29/0x40
[  207.272082]        [&lt;ffffffff81185210&gt;] drain_all_stock+0x30/0x150
[  207.272094]        [&lt;ffffffff811853da&gt;] mem_cgroup_reclaim+0xaa/0xe0
[  207.272104]        [&lt;ffffffff8118775e&gt;] __mem_cgroup_try_charge+0x51e/0xcf0
[  207.272114]        [&lt;ffffffff81188486&gt;] mem_cgroup_charge_common+0x36/0x60
[  207.272125]        [&lt;ffffffff811884da&gt;] mem_cgroup_newpage_charge+0x2a/0x30
[  207.272135]        [&lt;ffffffff81150531&gt;] do_wp_page+0x231/0x830
[  207.272147]        [&lt;ffffffff8115151e&gt;] handle_pte_fault+0x19e/0x8d0
[  207.272157]        [&lt;ffffffff81151da8&gt;] handle_mm_fault+0x158/0x1e0
[  207.272166]        [&lt;ffffffff814b6153&gt;] do_page_fault+0x2a3/0x4e0
[  207.272178]        [&lt;ffffffff814b2578&gt;] page_fault+0x28/0x30
[  207.272189]
[  207.272189] -&gt; #3 (&amp;mm-&gt;mmap_sem){++++++}:
[  207.272199]        [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.272208]        [&lt;ffffffff8114c5ad&gt;] might_fault+0x6d/0x90
[  207.272218]        [&lt;ffffffff811a11e3&gt;] filldir64+0xb3/0x120
[  207.272229]        [&lt;ffffffffa013fc19&gt;] call_filldir+0x89/0x130 [ext3]
[  207.272248]        [&lt;ffffffffa0140377&gt;] ext3_readdir+0x6b7/0x7e0 [ext3]
[  207.272263]        [&lt;ffffffff811a1519&gt;] vfs_readdir+0xa9/0xc0
[  207.272273]        [&lt;ffffffff811a15cb&gt;] sys_getdents64+0x9b/0x110
[  207.272284]        [&lt;ffffffff814bb599&gt;] system_call_fastpath+0x16/0x1b
[  207.272296]
[  207.272296] -&gt; #2 (&amp;type-&gt;i_mutex_dir_key#3){+.+.+.}:
[  207.272309]        [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.272319]        [&lt;ffffffff814ad807&gt;] mutex_lock_nested+0x37/0x360
[  207.272329]        [&lt;ffffffff8119c254&gt;] link_path_walk+0x6f4/0x9a0
[  207.272339]        [&lt;ffffffff8119e7fa&gt;] path_openat+0xba/0x470
[  207.272349]        [&lt;ffffffff8119ecf8&gt;] do_filp_open+0x48/0xa0
[  207.272358]        [&lt;ffffffff8118d81c&gt;] file_open_name+0xdc/0x110
[  207.272369]        [&lt;ffffffff8118d885&gt;] filp_open+0x35/0x40
[  207.272378]        [&lt;ffffffff8135c76e&gt;] _request_firmware+0x52e/0xb20
[  207.272389]        [&lt;ffffffff8135cdd6&gt;] request_firmware+0x16/0x20
[  207.272399]        [&lt;ffffffffa03bdb91&gt;] request_microcode_fw+0x61/0xd0 [microcode]
[  207.272416]        [&lt;ffffffffa03bd554&gt;] microcode_init_cpu+0x104/0x150 [microcode]
[  207.272431]        [&lt;ffffffffa03bd61c&gt;] mc_device_add+0x7c/0xb0 [microcode]
[  207.272444]        [&lt;ffffffff8134a419&gt;] subsys_interface_register+0xc9/0x100
[  207.272457]        [&lt;ffffffffa04fc0f4&gt;] 0xffffffffa04fc0f4
[  207.272472]        [&lt;ffffffff81000202&gt;] do_one_initcall+0x42/0x180
[  207.272485]        [&lt;ffffffff810bbeff&gt;] load_module+0x19df/0x1b70
[  207.272499]        [&lt;ffffffff810bc376&gt;] sys_init_module+0xe6/0x130
[  207.272511]        [&lt;ffffffff814bb599&gt;] system_call_fastpath+0x16/0x1b
[  207.272523]
[  207.272523] -&gt; #1 (umhelper_sem){++++.+}:
[  207.272537]        [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.272548]        [&lt;ffffffff814ae9c4&gt;] down_read+0x34/0x50
[  207.272559]        [&lt;ffffffff81062bff&gt;] usermodehelper_read_trylock+0x4f/0x100
[  207.272575]        [&lt;ffffffff8135c7dd&gt;] _request_firmware+0x59d/0xb20
[  207.272587]        [&lt;ffffffff8135cdd6&gt;] request_firmware+0x16/0x20
[  207.272599]        [&lt;ffffffffa03bdb91&gt;] request_microcode_fw+0x61/0xd0 [microcode]
[  207.272613]        [&lt;ffffffffa03bd554&gt;] microcode_init_cpu+0x104/0x150 [microcode]
[  207.272627]        [&lt;ffffffffa03bd61c&gt;] mc_device_add+0x7c/0xb0 [microcode]
[  207.272641]        [&lt;ffffffff8134a419&gt;] subsys_interface_register+0xc9/0x100
[  207.272654]        [&lt;ffffffffa04fc0f4&gt;] 0xffffffffa04fc0f4
[  207.272666]        [&lt;ffffffff81000202&gt;] do_one_initcall+0x42/0x180
[  207.272678]        [&lt;ffffffff810bbeff&gt;] load_module+0x19df/0x1b70
[  207.272690]        [&lt;ffffffff810bc376&gt;] sys_init_module+0xe6/0x130
[  207.272702]        [&lt;ffffffff814bb599&gt;] system_call_fastpath+0x16/0x1b
[  207.272715]
[  207.272715] -&gt; #0 (subsys mutex){+.+.+.}:
[  207.272729]        [&lt;ffffffff810ae002&gt;] __lock_acquire+0x13b2/0x15f0
[  207.272740]        [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.272751]        [&lt;ffffffff814ad807&gt;] mutex_lock_nested+0x37/0x360
[  207.272763]        [&lt;ffffffff8134af27&gt;] bus_remove_device+0x37/0x1c0
[  207.272775]        [&lt;ffffffff81349114&gt;] device_del+0x134/0x1f0
[  207.272786]        [&lt;ffffffff813491f2&gt;] device_unregister+0x22/0x60
[  207.272798]        [&lt;ffffffff814a24ea&gt;] mce_cpu_callback+0x15e/0x1ad
[  207.272812]        [&lt;ffffffff814b6402&gt;] notifier_call_chain+0x72/0x130
[  207.272824]        [&lt;ffffffff81073d6e&gt;] __raw_notifier_call_chain+0xe/0x10
[  207.272839]        [&lt;ffffffff81498f76&gt;] _cpu_down+0x1d6/0x350
[  207.272851]        [&lt;ffffffff81499130&gt;] cpu_down+0x40/0x60
[  207.272862]        [&lt;ffffffff8149cc55&gt;] store_online+0x75/0xe0
[  207.272874]        [&lt;ffffffff813474a0&gt;] dev_attr_store+0x20/0x30
[  207.272886]        [&lt;ffffffff812090d9&gt;] sysfs_write_file+0xd9/0x150
[  207.272900]        [&lt;ffffffff8118e10b&gt;] vfs_write+0xcb/0x130
[  207.272911]        [&lt;ffffffff8118e924&gt;] sys_write+0x64/0xa0
[  207.272923]        [&lt;ffffffff814bb599&gt;] system_call_fastpath+0x16/0x1b
[  207.272936]
[  207.272936] other info that might help us debug this:
[  207.272936]
[  207.272952] Chain exists of:
[  207.272952]   subsys mutex --&gt; &amp;mm-&gt;mmap_sem --&gt; cpu_hotplug.lock
[  207.272952]
[  207.272973]  Possible unsafe locking scenario:
[  207.272973]
[  207.272984]        CPU0                    CPU1
[  207.272992]        ----                    ----
[  207.273000]   lock(cpu_hotplug.lock);
[  207.273009]                                lock(&amp;mm-&gt;mmap_sem);
[  207.273020]                                lock(cpu_hotplug.lock);
[  207.273031]   lock(subsys mutex);
[  207.273040]
[  207.273040]  *** DEADLOCK ***
[  207.273040]
[  207.273055] 5 locks held by bash/10493:
[  207.273062]  #0:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;ffffffff81209049&gt;] sysfs_write_file+0x49/0x150
[  207.273080]  #1:  (s_active#150){.+.+.+}, at: [&lt;ffffffff812090c2&gt;] sysfs_write_file+0xc2/0x150
[  207.273099]  #2:  (x86_cpu_hotplug_driver_mutex){+.+.+.}, at: [&lt;ffffffff81027557&gt;] cpu_hotplug_driver_lock+0x17/0x20
[  207.273121]  #3:  (cpu_add_remove_lock){+.+.+.}, at: [&lt;ffffffff8149911c&gt;] cpu_down+0x2c/0x60
[  207.273140]  #4:  (cpu_hotplug.lock){+.+.+.}, at: [&lt;ffffffff81046ccf&gt;] cpu_hotplug_begin+0x2f/0x60
[  207.273158]
[  207.273158] stack backtrace:
[  207.273170] Pid: 10493, comm: bash Not tainted 3.9.0-rc1-0.7-default+ #34
[  207.273180] Call Trace:
[  207.273192]  [&lt;ffffffff810ab373&gt;] print_circular_bug+0x223/0x310
[  207.273204]  [&lt;ffffffff810ae002&gt;] __lock_acquire+0x13b2/0x15f0
[  207.273216]  [&lt;ffffffff812086b0&gt;] ? sysfs_hash_and_remove+0x60/0xc0
[  207.273227]  [&lt;ffffffff810ae329&gt;] lock_acquire+0xe9/0x120
[  207.273239]  [&lt;ffffffff8134af27&gt;] ? bus_remove_device+0x37/0x1c0
[  207.273251]  [&lt;ffffffff814ad807&gt;] mutex_lock_nested+0x37/0x360
[  207.273263]  [&lt;ffffffff8134af27&gt;] ? bus_remove_device+0x37/0x1c0
[  207.273274]  [&lt;ffffffff812086b0&gt;] ? sysfs_hash_and_remove+0x60/0xc0
[  207.273286]  [&lt;ffffffff8134af27&gt;] bus_remove_device+0x37/0x1c0
[  207.273298]  [&lt;ffffffff81349114&gt;] device_del+0x134/0x1f0
[  207.273309]  [&lt;ffffffff813491f2&gt;] device_unregister+0x22/0x60
[  207.273321]  [&lt;ffffffff814a24ea&gt;] mce_cpu_callback+0x15e/0x1ad
[  207.273332]  [&lt;ffffffff814b6402&gt;] notifier_call_chain+0x72/0x130
[  207.273344]  [&lt;ffffffff81073d6e&gt;] __raw_notifier_call_chain+0xe/0x10
[  207.273356]  [&lt;ffffffff81498f76&gt;] _cpu_down+0x1d6/0x350
[  207.273368]  [&lt;ffffffff81027557&gt;] ? cpu_hotplug_driver_lock+0x17/0x20
[  207.273380]  [&lt;ffffffff81499130&gt;] cpu_down+0x40/0x60
[  207.273391]  [&lt;ffffffff8149cc55&gt;] store_online+0x75/0xe0
[  207.273402]  [&lt;ffffffff813474a0&gt;] dev_attr_store+0x20/0x30
[  207.273413]  [&lt;ffffffff812090d9&gt;] sysfs_write_file+0xd9/0x150
[  207.273425]  [&lt;ffffffff8118e10b&gt;] vfs_write+0xcb/0x130
[  207.273436]  [&lt;ffffffff8118e924&gt;] sys_write+0x64/0xa0
[  207.273447]  [&lt;ffffffff814bb599&gt;] system_call_fastpath+0x16/0x1b

Which reports a false possitive deadlock because it sees:
1) load_module -&gt; subsys_interface_register -&gt; mc_deveice_add (*) -&gt; subsys-&gt;p-&gt;mutex -&gt; link_path_walk -&gt; lookup_slow -&gt; i_mutex
2) sys_write -&gt; _cpu_down -&gt; cpu_hotplug_begin -&gt; cpu_hotplug.lock -&gt; mce_cpu_callback -&gt; mce_device_remove(**) -&gt; device_unregister -&gt; bus_remove_device -&gt; subsys mutex
3) vfs_readdir -&gt; i_mutex -&gt; filldir64 -&gt; might_fault -&gt; might_lock_read(mmap_sem) -&gt; page_fault -&gt; mmap_sem -&gt; drain_all_stock -&gt; cpu_hotplug.lock

but
1) takes cpu_subsys subsys (*) but 2) takes mce_device subsys (**) so
the deadlock is not possible AFAICS.

The fix is quite simple. We can pull the key inside bus_type structure
because they are defined per device so the pointer will be unique as
well. bus_register doesn't need to be a macro anymore so change it
to the inline. We could get rid of __bus_register as there is no other
caller but maybe somebody will want to use a different key so keep it
around for now.

Reported-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Michal Hocko &lt;mhocko@suse.cz&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver/base: implement subsys_virtual_register()</title>
<updated>2013-03-12T18:36:35Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-03-12T18:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d73ce004225a7b2ed75f4340bb63721d55552265'/>
<id>urn:sha1:d73ce004225a7b2ed75f4340bb63721d55552265</id>
<content type='text'>
Kay tells me the most appropriate place to expose workqueues to
userland would be /sys/devices/virtual/workqueues/WQ_NAME which is
symlinked to /sys/bus/workqueue/devices/WQ_NAME and that we're lacking
a way to do that outside of driver core as virtual_device_parent()
isn't exported and there's no inteface to conveniently create a
virtual subsystem.

This patch implements subsys_virtual_register() by factoring out
subsys_register() from subsys_system_register() and using it with
virtual_device_parent() as the origin directory.  It's identical to
subsys_system_register() other than the origin directory but we aren't
gonna restrict the device names which should be used under it.

This will be used to expose workqueue attributes to userland.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</content>
</entry>
<entry>
<title>devres: allow adding custom actions to the stack</title>
<updated>2013-02-26T07:02:42Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2013-02-23T21:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b0c58048d2c8c6f4955c37f670125b2792cd14'/>
<id>urn:sha1:d6b0c58048d2c8c6f4955c37f670125b2792cd14</id>
<content type='text'>
Sometimes drivers need to execute one-off actions in their error handling
or device teardown paths. An example would be toggling a GPIO line to
reset the controlled device into predefined state.

To allow performing such actions when using managed resources let's allow
adding them to stack/group of devres resources.

Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2013-02-21T20:05:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-21T20:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=06991c28f37ad68e5c03777f5c3b679b56e3dac1'/>
<id>urn:sha1:06991c28f37ad68e5c03777f5c3b679b56e3dac1</id>
<content type='text'>
Pull driver core patches from Greg Kroah-Hartman:
 "Here is the big driver core merge for 3.9-rc1

  There are two major series here, both of which touch lots of drivers
  all over the kernel, and will cause you some merge conflicts:

   - add a new function called devm_ioremap_resource() to properly be
     able to check return values.

   - remove CONFIG_EXPERIMENTAL

  Other than those patches, there's not much here, some minor fixes and
  updates"

Fix up trivial conflicts

* tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
  base: memory: fix soft/hard_offline_page permissions
  drivercore: Fix ordering between deferred_probe and exiting initcalls
  backlight: fix class_find_device() arguments
  TTY: mark tty_get_device call with the proper const values
  driver-core: constify data for class_find_device()
  firmware: Ignore abort check when no user-helper is used
  firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
  firmware: Make user-mode helper optional
  firmware: Refactoring for splitting user-mode helper code
  Driver core: treat unregistered bus_types as having no devices
  watchdog: Convert to devm_ioremap_resource()
  thermal: Convert to devm_ioremap_resource()
  spi: Convert to devm_ioremap_resource()
  power: Convert to devm_ioremap_resource()
  mtd: Convert to devm_ioremap_resource()
  mmc: Convert to devm_ioremap_resource()
  mfd: Convert to devm_ioremap_resource()
  media: Convert to devm_ioremap_resource()
  iommu: Convert to devm_ioremap_resource()
  drm: Convert to devm_ioremap_resource()
  ...
</content>
</entry>
<entry>
<title>driver-core: constify data for class_find_device()</title>
<updated>2013-02-06T20:18:56Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2013-02-01T19:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f3b795a626ee79574595e06d1437fe0c7d51d29'/>
<id>urn:sha1:9f3b795a626ee79574595e06d1437fe0c7d51d29</id>
<content type='text'>
All in-kernel users of class_find_device() don't really need mutable
data for match callback.

In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c)
this patch changes match callbacks to use const search data.

The const is propagated to rtc_class_open() and power_supply_get_by_name()
parameters.

Note that there's a dev reference leak in suspend_test.c that's not
touched in this patch.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
