diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/chip.c | 6 | ||||
-rw-r--r-- | kernel/irq/resend.c | 3 | ||||
-rw-r--r-- | kernel/kmod.c | 5 | ||||
-rw-r--r-- | kernel/module.c | 6 | ||||
-rw-r--r-- | kernel/taskstats.c | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 9336f2e89e..ac1f850d49 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -252,7 +252,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) | |||
252 | mask_ack_irq(desc, irq); | 252 | mask_ack_irq(desc, irq); |
253 | 253 | ||
254 | if (unlikely(desc->status & IRQ_INPROGRESS)) | 254 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
255 | goto out; | 255 | goto out_unlock; |
256 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | 256 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); |
257 | kstat_cpu(cpu).irqs[irq]++; | 257 | kstat_cpu(cpu).irqs[irq]++; |
258 | 258 | ||
@@ -263,7 +263,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) | |||
263 | action = desc->action; | 263 | action = desc->action; |
264 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { | 264 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { |
265 | desc->status |= IRQ_PENDING; | 265 | desc->status |= IRQ_PENDING; |
266 | goto out; | 266 | goto out_unlock; |
267 | } | 267 | } |
268 | 268 | ||
269 | desc->status |= IRQ_INPROGRESS; | 269 | desc->status |= IRQ_INPROGRESS; |
@@ -276,9 +276,9 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) | |||
276 | 276 | ||
277 | spin_lock(&desc->lock); | 277 | spin_lock(&desc->lock); |
278 | desc->status &= ~IRQ_INPROGRESS; | 278 | desc->status &= ~IRQ_INPROGRESS; |
279 | out: | ||
280 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) | 279 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) |
281 | desc->chip->unmask(irq); | 280 | desc->chip->unmask(irq); |
281 | out_unlock: | ||
282 | spin_unlock(&desc->lock); | 282 | spin_unlock(&desc->lock); |
283 | } | 283 | } |
284 | 284 | ||
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 872f91ba2c..35f10f7ff9 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c | |||
@@ -63,8 +63,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq) | |||
63 | desc->chip->enable(irq); | 63 | desc->chip->enable(irq); |
64 | 64 | ||
65 | if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { | 65 | if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { |
66 | desc->status &= ~IRQ_PENDING; | 66 | desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY; |
67 | desc->status = status | IRQ_REPLAY; | ||
68 | 67 | ||
69 | if (!desc->chip || !desc->chip->retrigger || | 68 | if (!desc->chip || !desc->chip->retrigger || |
70 | !desc->chip->retrigger(irq)) { | 69 | !desc->chip->retrigger(irq)) { |
diff --git a/kernel/kmod.c b/kernel/kmod.c index 1d32defa38..5c470c57fb 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -197,11 +197,12 @@ static void __call_usermodehelper(void *data) | |||
197 | { | 197 | { |
198 | struct subprocess_info *sub_info = data; | 198 | struct subprocess_info *sub_info = data; |
199 | pid_t pid; | 199 | pid_t pid; |
200 | int wait = sub_info->wait; | ||
200 | 201 | ||
201 | /* CLONE_VFORK: wait until the usermode helper has execve'd | 202 | /* CLONE_VFORK: wait until the usermode helper has execve'd |
202 | * successfully We need the data structures to stay around | 203 | * successfully We need the data structures to stay around |
203 | * until that is done. */ | 204 | * until that is done. */ |
204 | if (sub_info->wait) | 205 | if (wait) |
205 | pid = kernel_thread(wait_for_helper, sub_info, | 206 | pid = kernel_thread(wait_for_helper, sub_info, |
206 | CLONE_FS | CLONE_FILES | SIGCHLD); | 207 | CLONE_FS | CLONE_FILES | SIGCHLD); |
207 | else | 208 | else |
@@ -211,7 +212,7 @@ static void __call_usermodehelper(void *data) | |||
211 | if (pid < 0) { | 212 | if (pid < 0) { |
212 | sub_info->retval = pid; | 213 | sub_info->retval = pid; |
213 | complete(sub_info->complete); | 214 | complete(sub_info->complete); |
214 | } else if (!sub_info->wait) | 215 | } else if (!wait) |
215 | complete(sub_info->complete); | 216 | complete(sub_info->complete); |
216 | } | 217 | } |
217 | 218 | ||
diff --git a/kernel/module.c b/kernel/module.c index 2a19cd47c0..b7fe6e8409 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1054,6 +1054,12 @@ static int mod_sysfs_setup(struct module *mod, | |||
1054 | { | 1054 | { |
1055 | int err; | 1055 | int err; |
1056 | 1056 | ||
1057 | if (!module_subsys.kset.subsys) { | ||
1058 | printk(KERN_ERR "%s: module_subsys not initialized\n", | ||
1059 | mod->name); | ||
1060 | err = -EINVAL; | ||
1061 | goto out; | ||
1062 | } | ||
1057 | memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); | 1063 | memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); |
1058 | err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); | 1064 | err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); |
1059 | if (err) | 1065 | if (err) |
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index e781876573..2ed4040d0d 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -75,7 +75,7 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, | |||
75 | /* | 75 | /* |
76 | * If new attributes are added, please revisit this allocation | 76 | * If new attributes are added, please revisit this allocation |
77 | */ | 77 | */ |
78 | skb = nlmsg_new(size); | 78 | skb = nlmsg_new(size, GFP_KERNEL); |
79 | if (!skb) | 79 | if (!skb) |
80 | return -ENOMEM; | 80 | return -ENOMEM; |
81 | 81 | ||