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
296static struct workqueue_attrs *unbound_std_wq_attrs[NR_STD_WORKER_POOLS];296static struct workqueue_attrs *unbound_std_wq_attrs[NR_STD_WORKER_POOLS];
297 297
298struct workqueue_struct *system_wq __read_mostly;298struct workqueue_struct *system_wq __read_mostly;
299EXPORT_SYMBOL_GPL(system_wq);299EXPORT_SYMBOL(system_wq);
300struct workqueue_struct *system_highpri_wq __read_mostly;300struct workqueue_struct *system_highpri_wq __read_mostly;
301EXPORT_SYMBOL_GPL(system_highpri_wq);301EXPORT_SYMBOL_GPL(system_highpri_wq);
302struct workqueue_struct *system_long_wq __read_mostly;302struct workqueue_struct *system_long_wq __read_mostly;
@@ -1411,7 +1411,7 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq, · 1108 unmodified lines
1411 local_irq_restore(flags);1411 local_irq_restore(flags);
1412 return ret;1412 return ret;
1413}1413}
1414EXPORT_SYMBOL_GPL(queue_work_on);1414EXPORT_SYMBOL(queue_work_on);
1415 1415
1416void delayed_work_timer_fn(unsigned long __data)1416void delayed_work_timer_fn(unsigned long __data)
1417{1417{
@@ -1485,7 +1485,7 @@ bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, · 67 unmodified lines
1485 local_irq_restore(flags);1485 local_irq_restore(flags);
1486 return ret;1486 return ret;
1487}1487}
1488EXPORT_SYMBOL_GPL(queue_delayed_work_on);1488EXPORT_SYMBOL(queue_delayed_work_on);
1489 1489
1490/**1490/**
1491 * mod_delayed_work_on - modify delay of or queue a delayed work on specific CPU1491 * 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
2059 if (unlikely(!mutex_trylock(&pool->manager_mutex))) {2059 if (unlikely(!mutex_trylock(&pool->manager_mutex))) {
2060 spin_unlock_irq(&pool->lock);2060 spin_unlock_irq(&pool->lock);
2061 mutex_lock(&pool->manager_mutex);2061 mutex_lock(&pool->manager_mutex);
2062 spin_lock_irq(&pool->lock);
2062 ret = true;2063 ret = true;
2063 }2064 }
2064 2065
@@ -4904,7 +4905,8 @@ static void __init wq_numa_init(void) · 2839 unmodified lines
4904 BUG_ON(!tbl);4905 BUG_ON(!tbl);
4905 4906
4906 for_each_node(node)4907 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));
4908 4910
4909 for_each_possible_cpu(cpu) {4911 for_each_possible_cpu(cpu) {
4910 node = cpu_to_node(cpu);4912 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