diff options
-rw-r--r-- | arch/parisc/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c | 10 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 20 | ||||
-rw-r--r-- | kernel/module.c | 7 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 1 |
6 files changed, 33 insertions, 9 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 528f0ff9b273..8b58bf0b7d5a 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -532,7 +532,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs) | |||
532 | /* Kill the user process later */ | 532 | /* Kill the user process later */ |
533 | regs->iaoq[0] = 0 | 3; | 533 | regs->iaoq[0] = 0 | 3; |
534 | regs->iaoq[1] = regs->iaoq[0] + 4; | 534 | regs->iaoq[1] = regs->iaoq[0] + 4; |
535 | regs->iasq[0] = regs->iasq[0] = regs->sr[7]; | 535 | regs->iasq[0] = regs->iasq[1] = regs->sr[7]; |
536 | regs->gr[0] &= ~PSW_B; | 536 | regs->gr[0] &= ~PSW_B; |
537 | return; | 537 | return; |
538 | } | 538 | } |
diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index bc3e880f9b82..fcec2f1d34a1 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
@@ -44,6 +44,11 @@ static struct apic *apic_probe[] __initdata = { | |||
44 | NULL, | 44 | NULL, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static int apicid_phys_pkg_id(int initial_apic_id, int index_msb) | ||
48 | { | ||
49 | return hard_smp_processor_id() >> index_msb; | ||
50 | } | ||
51 | |||
47 | /* | 52 | /* |
48 | * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. | 53 | * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. |
49 | */ | 54 | */ |
@@ -69,6 +74,11 @@ void __init default_setup_apic_routing(void) | |||
69 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | 74 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); |
70 | } | 75 | } |
71 | 76 | ||
77 | if (is_vsmp_box()) { | ||
78 | /* need to update phys_pkg_id */ | ||
79 | apic->phys_pkg_id = apicid_phys_pkg_id; | ||
80 | } | ||
81 | |||
72 | /* | 82 | /* |
73 | * Now that apic routing model is selected, configure the | 83 | * Now that apic routing model is selected, configure the |
74 | * fault handling for intr remapping. | 84 | * fault handling for intr remapping. |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index e90540a46a0b..eb33aaa8415d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -215,6 +215,7 @@ static __init void xen_init_cpuid_mask(void) | |||
215 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ | 215 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ |
216 | 216 | ||
217 | ax = 1; | 217 | ax = 1; |
218 | cx = 0; | ||
218 | xen_cpuid(&ax, &bx, &cx, &dx); | 219 | xen_cpuid(&ax, &bx, &cx, &dx); |
219 | 220 | ||
220 | /* cpuid claims we support xsave; try enabling it to see what happens */ | 221 | /* cpuid claims we support xsave; try enabling it to see what happens */ |
@@ -1059,6 +1060,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
1059 | /* set up basic CPUID stuff */ | 1060 | /* set up basic CPUID stuff */ |
1060 | cpu_detect(&new_cpu_data); | 1061 | cpu_detect(&new_cpu_data); |
1061 | new_cpu_data.hard_math = 1; | 1062 | new_cpu_data.hard_math = 1; |
1063 | new_cpu_data.wp_works_ok = 1; | ||
1062 | new_cpu_data.x86_capability[0] = cpuid_edx(1); | 1064 | new_cpu_data.x86_capability[0] = cpuid_edx(1); |
1063 | #endif | 1065 | #endif |
1064 | 1066 | ||
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 0e781bc88d1e..dcd2040d330c 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -154,7 +154,8 @@ static struct fsnotify_event *get_one_event(struct fsnotify_group *group, | |||
154 | 154 | ||
155 | event = fsnotify_peek_notify_event(group); | 155 | event = fsnotify_peek_notify_event(group); |
156 | 156 | ||
157 | event_size += roundup(event->name_len, event_size); | 157 | if (event->name_len) |
158 | event_size += roundup(event->name_len + 1, event_size); | ||
158 | 159 | ||
159 | if (event_size > count) | 160 | if (event_size > count) |
160 | return ERR_PTR(-EINVAL); | 161 | return ERR_PTR(-EINVAL); |
@@ -180,7 +181,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, | |||
180 | struct fsnotify_event_private_data *fsn_priv; | 181 | struct fsnotify_event_private_data *fsn_priv; |
181 | struct inotify_event_private_data *priv; | 182 | struct inotify_event_private_data *priv; |
182 | size_t event_size = sizeof(struct inotify_event); | 183 | size_t event_size = sizeof(struct inotify_event); |
183 | size_t name_len; | 184 | size_t name_len = 0; |
184 | 185 | ||
185 | /* we get the inotify watch descriptor from the event private data */ | 186 | /* we get the inotify watch descriptor from the event private data */ |
186 | spin_lock(&event->lock); | 187 | spin_lock(&event->lock); |
@@ -196,10 +197,12 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, | |||
196 | inotify_free_event_priv(fsn_priv); | 197 | inotify_free_event_priv(fsn_priv); |
197 | } | 198 | } |
198 | 199 | ||
199 | /* round up event->name_len so it is a multiple of event_size | 200 | /* |
201 | * round up event->name_len so it is a multiple of event_size | ||
200 | * plus an extra byte for the terminating '\0'. | 202 | * plus an extra byte for the terminating '\0'. |
201 | */ | 203 | */ |
202 | name_len = roundup(event->name_len + 1, event_size); | 204 | if (event->name_len) |
205 | name_len = roundup(event->name_len + 1, event_size); | ||
203 | inotify_event.len = name_len; | 206 | inotify_event.len = name_len; |
204 | 207 | ||
205 | inotify_event.mask = inotify_mask_to_arg(event->mask); | 208 | inotify_event.mask = inotify_mask_to_arg(event->mask); |
@@ -325,8 +328,9 @@ static long inotify_ioctl(struct file *file, unsigned int cmd, | |||
325 | list_for_each_entry(holder, &group->notification_list, event_list) { | 328 | list_for_each_entry(holder, &group->notification_list, event_list) { |
326 | event = holder->event; | 329 | event = holder->event; |
327 | send_len += sizeof(struct inotify_event); | 330 | send_len += sizeof(struct inotify_event); |
328 | send_len += roundup(event->name_len, | 331 | if (event->name_len) |
329 | sizeof(struct inotify_event)); | 332 | send_len += roundup(event->name_len + 1, |
333 | sizeof(struct inotify_event)); | ||
330 | } | 334 | } |
331 | mutex_unlock(&group->notification_mutex); | 335 | mutex_unlock(&group->notification_mutex); |
332 | ret = put_user(send_len, (int __user *) p); | 336 | ret = put_user(send_len, (int __user *) p); |
@@ -587,6 +591,10 @@ retry: | |||
587 | /* match the ref from fsnotify_init_markentry() */ | 591 | /* match the ref from fsnotify_init_markentry() */ |
588 | fsnotify_put_mark(&tmp_ientry->fsn_entry); | 592 | fsnotify_put_mark(&tmp_ientry->fsn_entry); |
589 | 593 | ||
594 | /* if this mark added a new event update the group mask */ | ||
595 | if (mask & ~group->mask) | ||
596 | fsnotify_recalc_group_mask(group); | ||
597 | |||
590 | out_err: | 598 | out_err: |
591 | if (ret < 0) | 599 | if (ret < 0) |
592 | kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); | 600 | kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); |
diff --git a/kernel/module.c b/kernel/module.c index eccb561dd8a3..2d537186191f 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1274,6 +1274,10 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect, | |||
1274 | struct module_notes_attrs *notes_attrs; | 1274 | struct module_notes_attrs *notes_attrs; |
1275 | struct bin_attribute *nattr; | 1275 | struct bin_attribute *nattr; |
1276 | 1276 | ||
1277 | /* failed to create section attributes, so can't create notes */ | ||
1278 | if (!mod->sect_attrs) | ||
1279 | return; | ||
1280 | |||
1277 | /* Count notes sections and allocate structures. */ | 1281 | /* Count notes sections and allocate structures. */ |
1278 | notes = 0; | 1282 | notes = 0; |
1279 | for (i = 0; i < nsect; i++) | 1283 | for (i = 0; i < nsect; i++) |
@@ -2355,8 +2359,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2355 | if (err < 0) | 2359 | if (err < 0) |
2356 | goto unlink; | 2360 | goto unlink; |
2357 | add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); | 2361 | add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); |
2358 | if (mod->sect_attrs) | 2362 | add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); |
2359 | add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); | ||
2360 | 2363 | ||
2361 | /* Get rid of temporary copy */ | 2364 | /* Get rid of temporary copy */ |
2362 | vfree(hdr); | 2365 | vfree(hdr); |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index ebfcf9b89909..df1039f077c2 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -937,6 +937,7 @@ static inline void | |||
937 | rpc_task_force_reencode(struct rpc_task *task) | 937 | rpc_task_force_reencode(struct rpc_task *task) |
938 | { | 938 | { |
939 | task->tk_rqstp->rq_snd_buf.len = 0; | 939 | task->tk_rqstp->rq_snd_buf.len = 0; |
940 | task->tk_rqstp->rq_bytes_sent = 0; | ||
940 | } | 941 | } |
941 | 942 | ||
942 | static inline void | 943 | static inline void |