diff options
| author | David S. Miller <davem@davemloft.net> | 2013-10-23 16:28:39 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-10-23 16:49:34 -0400 |
| commit | c3fa32b9764dc45dcf8a2231b1c110abc4a63e0b (patch) | |
| tree | 6cf2896a77b65bec64284681e1c3851eb3263e09 /kernel | |
| parent | 34d92d5315b64a3e5292b7e9511c1bb617227fb6 (diff) | |
| parent | 320437af954cbe66478f1f5e8b34cb5a8d072191 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
include/net/dst.h
Trivial merge conflicts, both were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup.c | 14 | ||||
| -rw-r--r-- | kernel/events/core.c | 6 | ||||
| -rw-r--r-- | kernel/power/snapshot.c | 5 | ||||
| -rw-r--r-- | kernel/power/user.c | 8 | ||||
| -rw-r--r-- | kernel/softirq.c | 15 |
5 files changed, 33 insertions, 15 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 2418b6e71a85..8bd9cfdc70d7 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -2039,7 +2039,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk, | |||
| 2039 | 2039 | ||
| 2040 | /* @tsk either already exited or can't exit until the end */ | 2040 | /* @tsk either already exited or can't exit until the end */ |
| 2041 | if (tsk->flags & PF_EXITING) | 2041 | if (tsk->flags & PF_EXITING) |
| 2042 | continue; | 2042 | goto next; |
| 2043 | 2043 | ||
| 2044 | /* as per above, nr_threads may decrease, but not increase. */ | 2044 | /* as per above, nr_threads may decrease, but not increase. */ |
| 2045 | BUG_ON(i >= group_size); | 2045 | BUG_ON(i >= group_size); |
| @@ -2047,7 +2047,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk, | |||
| 2047 | ent.cgrp = task_cgroup_from_root(tsk, root); | 2047 | ent.cgrp = task_cgroup_from_root(tsk, root); |
| 2048 | /* nothing to do if this task is already in the cgroup */ | 2048 | /* nothing to do if this task is already in the cgroup */ |
| 2049 | if (ent.cgrp == cgrp) | 2049 | if (ent.cgrp == cgrp) |
| 2050 | continue; | 2050 | goto next; |
| 2051 | /* | 2051 | /* |
| 2052 | * saying GFP_ATOMIC has no effect here because we did prealloc | 2052 | * saying GFP_ATOMIC has no effect here because we did prealloc |
| 2053 | * earlier, but it's good form to communicate our expectations. | 2053 | * earlier, but it's good form to communicate our expectations. |
| @@ -2055,7 +2055,7 @@ static int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk, | |||
| 2055 | retval = flex_array_put(group, i, &ent, GFP_ATOMIC); | 2055 | retval = flex_array_put(group, i, &ent, GFP_ATOMIC); |
| 2056 | BUG_ON(retval != 0); | 2056 | BUG_ON(retval != 0); |
| 2057 | i++; | 2057 | i++; |
| 2058 | 2058 | next: | |
| 2059 | if (!threadgroup) | 2059 | if (!threadgroup) |
| 2060 | break; | 2060 | break; |
| 2061 | } while_each_thread(leader, tsk); | 2061 | } while_each_thread(leader, tsk); |
| @@ -3188,11 +3188,9 @@ css_next_descendant_post(struct cgroup_subsys_state *pos, | |||
| 3188 | 3188 | ||
| 3189 | WARN_ON_ONCE(!rcu_read_lock_held()); | 3189 | WARN_ON_ONCE(!rcu_read_lock_held()); |
| 3190 | 3190 | ||
| 3191 | /* if first iteration, visit the leftmost descendant */ | 3191 | /* if first iteration, visit leftmost descendant which may be @root */ |
| 3192 | if (!pos) { | 3192 | if (!pos) |
| 3193 | next = css_leftmost_descendant(root); | 3193 | return css_leftmost_descendant(root); |
| 3194 | return next != root ? next : NULL; | ||
| 3195 | } | ||
| 3196 | 3194 | ||
| 3197 | /* if we visited @root, we're done */ | 3195 | /* if we visited @root, we're done */ |
| 3198 | if (pos == root) | 3196 | if (pos == root) |
diff --git a/kernel/events/core.c b/kernel/events/core.c index cb4238e85b38..d49a9d29334c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
| @@ -7234,15 +7234,15 @@ void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) | |||
| 7234 | perf_remove_from_context(event); | 7234 | perf_remove_from_context(event); |
| 7235 | unaccount_event_cpu(event, src_cpu); | 7235 | unaccount_event_cpu(event, src_cpu); |
| 7236 | put_ctx(src_ctx); | 7236 | put_ctx(src_ctx); |
| 7237 | list_add(&event->event_entry, &events); | 7237 | list_add(&event->migrate_entry, &events); |
| 7238 | } | 7238 | } |
| 7239 | mutex_unlock(&src_ctx->mutex); | 7239 | mutex_unlock(&src_ctx->mutex); |
| 7240 | 7240 | ||
| 7241 | synchronize_rcu(); | 7241 | synchronize_rcu(); |
| 7242 | 7242 | ||
| 7243 | mutex_lock(&dst_ctx->mutex); | 7243 | mutex_lock(&dst_ctx->mutex); |
| 7244 | list_for_each_entry_safe(event, tmp, &events, event_entry) { | 7244 | list_for_each_entry_safe(event, tmp, &events, migrate_entry) { |
| 7245 | list_del(&event->event_entry); | 7245 | list_del(&event->migrate_entry); |
| 7246 | if (event->state >= PERF_EVENT_STATE_OFF) | 7246 | if (event->state >= PERF_EVENT_STATE_OFF) |
| 7247 | event->state = PERF_EVENT_STATE_INACTIVE; | 7247 | event->state = PERF_EVENT_STATE_INACTIVE; |
| 7248 | account_event_cpu(event, dst_cpu); | 7248 | account_event_cpu(event, dst_cpu); |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 358a146fd4da..98c3b34a4cff 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
| @@ -743,7 +743,10 @@ int create_basic_memory_bitmaps(void) | |||
| 743 | struct memory_bitmap *bm1, *bm2; | 743 | struct memory_bitmap *bm1, *bm2; |
| 744 | int error = 0; | 744 | int error = 0; |
| 745 | 745 | ||
| 746 | BUG_ON(forbidden_pages_map || free_pages_map); | 746 | if (forbidden_pages_map && free_pages_map) |
| 747 | return 0; | ||
| 748 | else | ||
| 749 | BUG_ON(forbidden_pages_map || free_pages_map); | ||
| 747 | 750 | ||
| 748 | bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); | 751 | bm1 = kzalloc(sizeof(struct memory_bitmap), GFP_KERNEL); |
| 749 | if (!bm1) | 752 | if (!bm1) |
diff --git a/kernel/power/user.c b/kernel/power/user.c index 72e8f4fd616d..957f06164ad1 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
| @@ -39,6 +39,7 @@ static struct snapshot_data { | |||
| 39 | char frozen; | 39 | char frozen; |
| 40 | char ready; | 40 | char ready; |
| 41 | char platform_support; | 41 | char platform_support; |
| 42 | bool free_bitmaps; | ||
| 42 | } snapshot_state; | 43 | } snapshot_state; |
| 43 | 44 | ||
| 44 | atomic_t snapshot_device_available = ATOMIC_INIT(1); | 45 | atomic_t snapshot_device_available = ATOMIC_INIT(1); |
| @@ -82,6 +83,10 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
| 82 | data->swap = -1; | 83 | data->swap = -1; |
| 83 | data->mode = O_WRONLY; | 84 | data->mode = O_WRONLY; |
| 84 | error = pm_notifier_call_chain(PM_RESTORE_PREPARE); | 85 | error = pm_notifier_call_chain(PM_RESTORE_PREPARE); |
| 86 | if (!error) { | ||
| 87 | error = create_basic_memory_bitmaps(); | ||
| 88 | data->free_bitmaps = !error; | ||
| 89 | } | ||
| 85 | if (error) | 90 | if (error) |
| 86 | pm_notifier_call_chain(PM_POST_RESTORE); | 91 | pm_notifier_call_chain(PM_POST_RESTORE); |
| 87 | } | 92 | } |
| @@ -111,6 +116,8 @@ static int snapshot_release(struct inode *inode, struct file *filp) | |||
| 111 | pm_restore_gfp_mask(); | 116 | pm_restore_gfp_mask(); |
| 112 | free_basic_memory_bitmaps(); | 117 | free_basic_memory_bitmaps(); |
| 113 | thaw_processes(); | 118 | thaw_processes(); |
| 119 | } else if (data->free_bitmaps) { | ||
| 120 | free_basic_memory_bitmaps(); | ||
| 114 | } | 121 | } |
| 115 | pm_notifier_call_chain(data->mode == O_RDONLY ? | 122 | pm_notifier_call_chain(data->mode == O_RDONLY ? |
| 116 | PM_POST_HIBERNATION : PM_POST_RESTORE); | 123 | PM_POST_HIBERNATION : PM_POST_RESTORE); |
| @@ -231,6 +238,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
| 231 | break; | 238 | break; |
| 232 | pm_restore_gfp_mask(); | 239 | pm_restore_gfp_mask(); |
| 233 | free_basic_memory_bitmaps(); | 240 | free_basic_memory_bitmaps(); |
| 241 | data->free_bitmaps = false; | ||
| 234 | thaw_processes(); | 242 | thaw_processes(); |
| 235 | data->frozen = 0; | 243 | data->frozen = 0; |
| 236 | break; | 244 | break; |
diff --git a/kernel/softirq.c b/kernel/softirq.c index 53cc09ceb0b8..d7d498d8cc4f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
| @@ -328,10 +328,19 @@ void irq_enter(void) | |||
| 328 | 328 | ||
| 329 | static inline void invoke_softirq(void) | 329 | static inline void invoke_softirq(void) |
| 330 | { | 330 | { |
| 331 | if (!force_irqthreads) | 331 | if (!force_irqthreads) { |
| 332 | __do_softirq(); | 332 | /* |
| 333 | else | 333 | * We can safely execute softirq on the current stack if |
| 334 | * it is the irq stack, because it should be near empty | ||
| 335 | * at this stage. But we have no way to know if the arch | ||
| 336 | * calls irq_exit() on the irq stack. So call softirq | ||
| 337 | * in its own stack to prevent from any overrun on top | ||
| 338 | * of a potentially deep task stack. | ||
| 339 | */ | ||
| 340 | do_softirq(); | ||
| 341 | } else { | ||
| 334 | wakeup_softirqd(); | 342 | wakeup_softirqd(); |
| 343 | } | ||
| 335 | } | 344 | } |
| 336 | 345 | ||
| 337 | static inline void tick_irq_exit(void) | 346 | static inline void tick_irq_exit(void) |
