diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /kernel | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 5 | ||||
-rw-r--r-- | kernel/irq/handle.c | 4 | ||||
-rw-r--r-- | kernel/irq/spurious.c | 6 | ||||
-rw-r--r-- | kernel/kmod.c | 8 | ||||
-rw-r--r-- | kernel/module.c | 31 | ||||
-rw-r--r-- | kernel/spinlock.c | 21 | ||||
-rw-r--r-- | kernel/taskstats.c | 11 | ||||
-rw-r--r-- | kernel/unwind.c | 9 |
8 files changed, 63 insertions, 32 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 3da978eec791..8cdd3e72ba55 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1315,9 +1315,8 @@ struct task_struct * __devinit fork_idle(int cpu) | |||
1315 | struct pt_regs regs; | 1315 | struct pt_regs regs; |
1316 | 1316 | ||
1317 | task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); | 1317 | task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); |
1318 | if (!task) | 1318 | if (!IS_ERR(task)) |
1319 | return ERR_PTR(-ENOMEM); | 1319 | init_idle(task, cpu); |
1320 | init_idle(task, cpu); | ||
1321 | 1320 | ||
1322 | return task; | 1321 | return task; |
1323 | } | 1322 | } |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 42aa6f1a3f0f..a681912bc89a 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -231,10 +231,10 @@ fastcall unsigned int __do_IRQ(unsigned int irq) | |||
231 | spin_unlock(&desc->lock); | 231 | spin_unlock(&desc->lock); |
232 | 232 | ||
233 | action_ret = handle_IRQ_event(irq, action); | 233 | action_ret = handle_IRQ_event(irq, action); |
234 | |||
235 | spin_lock(&desc->lock); | ||
236 | if (!noirqdebug) | 234 | if (!noirqdebug) |
237 | note_interrupt(irq, desc, action_ret); | 235 | note_interrupt(irq, desc, action_ret); |
236 | |||
237 | spin_lock(&desc->lock); | ||
238 | if (likely(!(desc->status & IRQ_PENDING))) | 238 | if (likely(!(desc->status & IRQ_PENDING))) |
239 | break; | 239 | break; |
240 | desc->status &= ~IRQ_PENDING; | 240 | desc->status &= ~IRQ_PENDING; |
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 9c7e2e4c1fe7..543ea2e5ad93 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -147,11 +147,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
147 | if (unlikely(irqfixup)) { | 147 | if (unlikely(irqfixup)) { |
148 | /* Don't punish working computers */ | 148 | /* Don't punish working computers */ |
149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { | 149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { |
150 | int ok; | 150 | int ok = misrouted_irq(irq); |
151 | |||
152 | spin_unlock(&desc->lock); | ||
153 | ok = misrouted_irq(irq); | ||
154 | spin_lock(&desc->lock); | ||
155 | if (action_ret == IRQ_NONE) | 151 | if (action_ret == IRQ_NONE) |
156 | desc->irqs_unhandled -= ok; | 152 | desc->irqs_unhandled -= ok; |
157 | } | 153 | } |
diff --git a/kernel/kmod.c b/kernel/kmod.c index 7dc7a9dad6ac..8d2bea09a4ec 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -311,14 +311,14 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp, | |||
311 | return 0; | 311 | return 0; |
312 | 312 | ||
313 | f = create_write_pipe(); | 313 | f = create_write_pipe(); |
314 | if (!f) | 314 | if (IS_ERR(f)) |
315 | return -ENOMEM; | 315 | return PTR_ERR(f); |
316 | *filp = f; | 316 | *filp = f; |
317 | 317 | ||
318 | f = create_read_pipe(f); | 318 | f = create_read_pipe(f); |
319 | if (!f) { | 319 | if (IS_ERR(f)) { |
320 | free_write_pipe(*filp); | 320 | free_write_pipe(*filp); |
321 | return -ENOMEM; | 321 | return PTR_ERR(f); |
322 | } | 322 | } |
323 | sub_info.stdin = f; | 323 | sub_info.stdin = f; |
324 | 324 | ||
diff --git a/kernel/module.c b/kernel/module.c index f0166563c602..45e01cb60101 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1086,22 +1086,35 @@ static int mod_sysfs_setup(struct module *mod, | |||
1086 | goto out; | 1086 | goto out; |
1087 | kobj_set_kset_s(&mod->mkobj, module_subsys); | 1087 | kobj_set_kset_s(&mod->mkobj, module_subsys); |
1088 | mod->mkobj.mod = mod; | 1088 | mod->mkobj.mod = mod; |
1089 | err = kobject_register(&mod->mkobj.kobj); | 1089 | |
1090 | /* delay uevent until full sysfs population */ | ||
1091 | kobject_init(&mod->mkobj.kobj); | ||
1092 | err = kobject_add(&mod->mkobj.kobj); | ||
1090 | if (err) | 1093 | if (err) |
1091 | goto out; | 1094 | goto out; |
1092 | 1095 | ||
1096 | mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers"); | ||
1097 | if (!mod->drivers_dir) | ||
1098 | goto out_unreg; | ||
1099 | |||
1093 | err = module_param_sysfs_setup(mod, kparam, num_params); | 1100 | err = module_param_sysfs_setup(mod, kparam, num_params); |
1094 | if (err) | 1101 | if (err) |
1095 | goto out_unreg; | 1102 | goto out_unreg_drivers; |
1096 | 1103 | ||
1097 | err = module_add_modinfo_attrs(mod); | 1104 | err = module_add_modinfo_attrs(mod); |
1098 | if (err) | 1105 | if (err) |
1099 | goto out_unreg; | 1106 | goto out_unreg_param; |
1100 | 1107 | ||
1108 | kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD); | ||
1101 | return 0; | 1109 | return 0; |
1102 | 1110 | ||
1111 | out_unreg_drivers: | ||
1112 | kobject_unregister(mod->drivers_dir); | ||
1113 | out_unreg_param: | ||
1114 | module_param_sysfs_remove(mod); | ||
1103 | out_unreg: | 1115 | out_unreg: |
1104 | kobject_unregister(&mod->mkobj.kobj); | 1116 | kobject_del(&mod->mkobj.kobj); |
1117 | kobject_put(&mod->mkobj.kobj); | ||
1105 | out: | 1118 | out: |
1106 | return err; | 1119 | return err; |
1107 | } | 1120 | } |
@@ -1110,6 +1123,7 @@ static void mod_kobject_remove(struct module *mod) | |||
1110 | { | 1123 | { |
1111 | module_remove_modinfo_attrs(mod); | 1124 | module_remove_modinfo_attrs(mod); |
1112 | module_param_sysfs_remove(mod); | 1125 | module_param_sysfs_remove(mod); |
1126 | kobject_unregister(mod->drivers_dir); | ||
1113 | 1127 | ||
1114 | kobject_unregister(&mod->mkobj.kobj); | 1128 | kobject_unregister(&mod->mkobj.kobj); |
1115 | } | 1129 | } |
@@ -2275,11 +2289,14 @@ void print_modules(void) | |||
2275 | 2289 | ||
2276 | void module_add_driver(struct module *mod, struct device_driver *drv) | 2290 | void module_add_driver(struct module *mod, struct device_driver *drv) |
2277 | { | 2291 | { |
2292 | int no_warn; | ||
2293 | |||
2278 | if (!mod || !drv) | 2294 | if (!mod || !drv) |
2279 | return; | 2295 | return; |
2280 | 2296 | ||
2281 | /* Don't check return code; this call is idempotent */ | 2297 | /* Don't check return codes; these calls are idempotent */ |
2282 | sysfs_create_link(&drv->kobj, &mod->mkobj.kobj, "module"); | 2298 | no_warn = sysfs_create_link(&drv->kobj, &mod->mkobj.kobj, "module"); |
2299 | no_warn = sysfs_create_link(mod->drivers_dir, &drv->kobj, drv->name); | ||
2283 | } | 2300 | } |
2284 | EXPORT_SYMBOL(module_add_driver); | 2301 | EXPORT_SYMBOL(module_add_driver); |
2285 | 2302 | ||
@@ -2288,6 +2305,8 @@ void module_remove_driver(struct device_driver *drv) | |||
2288 | if (!drv) | 2305 | if (!drv) |
2289 | return; | 2306 | return; |
2290 | sysfs_remove_link(&drv->kobj, "module"); | 2307 | sysfs_remove_link(&drv->kobj, "module"); |
2308 | if (drv->owner && drv->owner->drivers_dir) | ||
2309 | sysfs_remove_link(drv->owner->drivers_dir, drv->name); | ||
2291 | } | 2310 | } |
2292 | EXPORT_SYMBOL(module_remove_driver); | 2311 | EXPORT_SYMBOL(module_remove_driver); |
2293 | 2312 | ||
diff --git a/kernel/spinlock.c b/kernel/spinlock.c index 476c3741511b..2c6c2bf85514 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c | |||
@@ -293,6 +293,27 @@ void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) | |||
293 | } | 293 | } |
294 | 294 | ||
295 | EXPORT_SYMBOL(_spin_lock_nested); | 295 | EXPORT_SYMBOL(_spin_lock_nested); |
296 | unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) | ||
297 | { | ||
298 | unsigned long flags; | ||
299 | |||
300 | local_irq_save(flags); | ||
301 | preempt_disable(); | ||
302 | spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_); | ||
303 | /* | ||
304 | * On lockdep we dont want the hand-coded irq-enable of | ||
305 | * _raw_spin_lock_flags() code, because lockdep assumes | ||
306 | * that interrupts are not re-enabled during lock-acquire: | ||
307 | */ | ||
308 | #ifdef CONFIG_PROVE_SPIN_LOCKING | ||
309 | _raw_spin_lock(lock); | ||
310 | #else | ||
311 | _raw_spin_lock_flags(lock, &flags); | ||
312 | #endif | ||
313 | return flags; | ||
314 | } | ||
315 | |||
316 | EXPORT_SYMBOL(_spin_lock_irqsave_nested); | ||
296 | 317 | ||
297 | #endif | 318 | #endif |
298 | 319 | ||
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index f45c5e70773c..d3d28919d4b4 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -77,8 +77,7 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, | |||
77 | /* | 77 | /* |
78 | * If new attributes are added, please revisit this allocation | 78 | * If new attributes are added, please revisit this allocation |
79 | */ | 79 | */ |
80 | size = nlmsg_total_size(genlmsg_total_size(size)); | 80 | skb = genlmsg_new(size, GFP_KERNEL); |
81 | skb = nlmsg_new(size, GFP_KERNEL); | ||
82 | if (!skb) | 81 | if (!skb) |
83 | return -ENOMEM; | 82 | return -ENOMEM; |
84 | 83 | ||
@@ -86,13 +85,9 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, | |||
86 | int seq = get_cpu_var(taskstats_seqnum)++; | 85 | int seq = get_cpu_var(taskstats_seqnum)++; |
87 | put_cpu_var(taskstats_seqnum); | 86 | put_cpu_var(taskstats_seqnum); |
88 | 87 | ||
89 | reply = genlmsg_put(skb, 0, seq, | 88 | reply = genlmsg_put(skb, 0, seq, &family, 0, cmd); |
90 | family.id, 0, 0, | ||
91 | cmd, family.version); | ||
92 | } else | 89 | } else |
93 | reply = genlmsg_put(skb, info->snd_pid, info->snd_seq, | 90 | reply = genlmsg_put_reply(skb, info, &family, 0, cmd); |
94 | family.id, 0, 0, | ||
95 | cmd, family.version); | ||
96 | if (reply == NULL) { | 91 | if (reply == NULL) { |
97 | nlmsg_free(skb); | 92 | nlmsg_free(skb); |
98 | return -EINVAL; | 93 | return -EINVAL; |
diff --git a/kernel/unwind.c b/kernel/unwind.c index f7e50d16dbf6..ed0a21d4a902 100644 --- a/kernel/unwind.c +++ b/kernel/unwind.c | |||
@@ -938,8 +938,11 @@ int unwind(struct unwind_frame_info *frame) | |||
938 | else { | 938 | else { |
939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); | 939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); |
940 | /* skip augmentation */ | 940 | /* skip augmentation */ |
941 | if (((const char *)(cie + 2))[1] == 'z') | 941 | if (((const char *)(cie + 2))[1] == 'z') { |
942 | ptr += get_uleb128(&ptr, end); | 942 | uleb128_t augSize = get_uleb128(&ptr, end); |
943 | |||
944 | ptr += augSize; | ||
945 | } | ||
943 | if (ptr > end | 946 | if (ptr > end |
944 | || retAddrReg >= ARRAY_SIZE(reg_info) | 947 | || retAddrReg >= ARRAY_SIZE(reg_info) |
945 | || REG_INVALID(retAddrReg) | 948 | || REG_INVALID(retAddrReg) |
@@ -963,9 +966,7 @@ int unwind(struct unwind_frame_info *frame) | |||
963 | if (cie == NULL || fde == NULL) { | 966 | if (cie == NULL || fde == NULL) { |
964 | #ifdef CONFIG_FRAME_POINTER | 967 | #ifdef CONFIG_FRAME_POINTER |
965 | unsigned long top, bottom; | 968 | unsigned long top, bottom; |
966 | #endif | ||
967 | 969 | ||
968 | #ifdef CONFIG_FRAME_POINTER | ||
969 | top = STACK_TOP(frame->task); | 970 | top = STACK_TOP(frame->task); |
970 | bottom = STACK_BOTTOM(frame->task); | 971 | bottom = STACK_BOTTOM(frame->task); |
971 | # if FRAME_RETADDR_OFFSET < 0 | 972 | # if FRAME_RETADDR_OFFSET < 0 |