History

Merge branch 'for-3.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fixes from Tejun Heo: "Three more workqueue regression fixes. - Fix unbalanced unlock in trylock failure path of manage_workers(). This shouldn't happen often in the wild but is possible. - While making schedule_work() and friends inline, they become unavailable to !GPL modules. Allow !GPL modules to access basic stuff - system_wq and queue_*work_on() - so that schedule_work() and friends can be used. - During boot, the unbound NUMA support code allocates a cpumask for each possible node using alloc_cpumask_var_node(), which ends up trying to allocate node-specific memory even for offline nodes triggering BUG in the memory alloc code. Use NUMA_NO_NODE for offline nodes." * 'for-3.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: don't perform NUMA-aware allocations on offline nodes in wq_numa_init() workqueue: Make schedule_work() available again to non GPL modules workqueue: correct handling of the pool spin_lock

Linus Torvalds committed 13 years ago

Commit 4a007ed2 parents ff89acc 1be0c251 file · +6 −4Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+6−4
@@ -296,7 +296,7 @@ static DEFINE_HASHTABLE(unbound_pool_hash, UNBOUND_POOL_HASH_ORDER); · 295 unmodified lines
296296 static struct workqueue_attrs *unbound_std_wq_attrs[NR_STD_WORKER_POOLS];
297297
298298 struct workqueue_struct *system_wq __read_mostly;
299−EXPORT_SYMBOL_GPL(system_wq);
299+EXPORT_SYMBOL(system_wq);
300300 struct workqueue_struct *system_highpri_wq __read_mostly;
301301 EXPORT_SYMBOL_GPL(system_highpri_wq);
302302 struct workqueue_struct *system_long_wq __read_mostly;
@@ -1411,7 +1411,7 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq, · 1108 unmodified lines
14111411 local_irq_restore(flags);
14121412 return ret;
14131413 }
1414−EXPORT_SYMBOL_GPL(queue_work_on);
1414+EXPORT_SYMBOL(queue_work_on);
14151415
14161416 void delayed_work_timer_fn(unsigned long __data)
14171417 {
@@ -1485,7 +1485,7 @@ bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, · 67 unmodified lines
14851485 local_irq_restore(flags);
14861486 return ret;
14871487 }
1488−EXPORT_SYMBOL_GPL(queue_delayed_work_on);
1488+EXPORT_SYMBOL(queue_delayed_work_on);
14891489
14901490 /**
14911491 * mod_delayed_work_on - modify delay of or queue a delayed work on specific CPU
@@ -2059,6 +2059,7 @@ static bool manage_workers(struct worker *worker) · 567 unmodified lines
20592059 if (unlikely(!mutex_trylock(&pool->manager_mutex))) {
20602060 spin_unlock_irq(&pool->lock);
20612061 mutex_lock(&pool->manager_mutex);
2062+ spin_lock_irq(&pool->lock);
20622063 ret = true;
20632064 }
20642065
@@ -4904,7 +4905,8 @@ static void __init wq_numa_init(void) · 2839 unmodified lines
49044905 BUG_ON(!tbl);
49054906
49064907 for_each_node(node)
4907− BUG_ON(!alloc_cpumask_var_node(&tbl[node], GFP_KERNEL, node));
4908+ BUG_ON(!alloc_cpumask_var_node(&tbl[node], GFP_KERNEL,
4909+ node_online(node) ? node : NUMA_NO_NODE));
49084910
49094911 for_each_possible_cpu(cpu) {
49104912 node = cpu_to_node(cpu);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t