diff options
-rw-r--r-- | arch/i386/kernel/io_apic.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/reboot.c | 8 | ||||
-rw-r--r-- | drivers/video/Kconfig | 13 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 15 | ||||
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 1 | ||||
-rw-r--r-- | fs/hfsplus/hfsplus_raw.h | 12 | ||||
-rw-r--r-- | fs/hfsplus/options.c | 6 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 20 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 9 | ||||
-rw-r--r-- | include/linux/cn_proc.h | 8 | ||||
-rw-r--r-- | kernel/power/main.c | 21 | ||||
-rw-r--r-- | kernel/ptrace.c | 3 |
12 files changed, 90 insertions, 30 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index cc5d7ac5b2e7..22c8675c79f4 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2009,7 +2009,7 @@ static void ack_edge_ioapic_vector(unsigned int vector) | |||
2009 | { | 2009 | { |
2010 | int irq = vector_to_irq(vector); | 2010 | int irq = vector_to_irq(vector); |
2011 | 2011 | ||
2012 | move_irq(vector); | 2012 | move_native_irq(vector); |
2013 | ack_edge_ioapic_irq(irq); | 2013 | ack_edge_ioapic_irq(irq); |
2014 | } | 2014 | } |
2015 | 2015 | ||
@@ -2024,7 +2024,7 @@ static void end_level_ioapic_vector (unsigned int vector) | |||
2024 | { | 2024 | { |
2025 | int irq = vector_to_irq(vector); | 2025 | int irq = vector_to_irq(vector); |
2026 | 2026 | ||
2027 | move_irq(vector); | 2027 | move_native_irq(vector); |
2028 | end_level_ioapic_irq(irq); | 2028 | end_level_ioapic_irq(irq); |
2029 | } | 2029 | } |
2030 | 2030 | ||
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 350ea6680f63..2afe0f8d555a 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -111,6 +111,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
111 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), | 111 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), |
112 | }, | 112 | }, |
113 | }, | 113 | }, |
114 | { /* Handle problems with rebooting on HP nc6120 */ | ||
115 | .callback = set_bios_reboot, | ||
116 | .ident = "HP Compaq nc6120", | ||
117 | .matches = { | ||
118 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
119 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6120"), | ||
120 | }, | ||
121 | }, | ||
114 | { } | 122 | { } |
115 | }; | 123 | }; |
116 | 124 | ||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 25b6ca6ad081..3e470c8b4193 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -534,6 +534,12 @@ config FB_SUN3 | |||
534 | bool "Sun3 framebuffer support" | 534 | bool "Sun3 framebuffer support" |
535 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN | 535 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN |
536 | 536 | ||
537 | config FB_SBUS | ||
538 | bool "SBUS and UPA framebuffers" | ||
539 | depends on (FB = y) && (SPARC32 || SPARC64) | ||
540 | help | ||
541 | Say Y if you want support for SBUS or UPA based frame buffer device. | ||
542 | |||
537 | config FB_BW2 | 543 | config FB_BW2 |
538 | bool "BWtwo support" | 544 | bool "BWtwo support" |
539 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 545 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
@@ -546,6 +552,7 @@ config FB_BW2 | |||
546 | config FB_CG3 | 552 | config FB_CG3 |
547 | bool "CGthree support" | 553 | bool "CGthree support" |
548 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 554 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
555 | select FB_CFB_FILLRECT | ||
549 | select FB_CFB_COPYAREA | 556 | select FB_CFB_COPYAREA |
550 | select FB_CFB_IMAGEBLIT | 557 | select FB_CFB_IMAGEBLIT |
551 | help | 558 | help |
@@ -1210,12 +1217,6 @@ config FB_AU1100 | |||
1210 | 1217 | ||
1211 | source "drivers/video/geode/Kconfig" | 1218 | source "drivers/video/geode/Kconfig" |
1212 | 1219 | ||
1213 | config FB_SBUS | ||
1214 | bool "SBUS and UPA framebuffers" | ||
1215 | depends on (FB = y) && (SPARC32 || SPARC64) | ||
1216 | help | ||
1217 | Say Y if you want support for SBUS or UPA based frame buffer device. | ||
1218 | |||
1219 | config FB_FFB | 1220 | config FB_FFB |
1220 | bool "Creator/Creator3D/Elite3D support" | 1221 | bool "Creator/Creator3D/Elite3D support" |
1221 | depends on FB_SBUS && SPARC64 | 1222 | depends on FB_SBUS && SPARC64 |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 2858c5c8ba3c..e0dbdfc0c8b4 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -404,7 +404,7 @@ struct cirrusfb_info { | |||
404 | struct cirrusfb_regs currentmode; | 404 | struct cirrusfb_regs currentmode; |
405 | int blank_mode; | 405 | int blank_mode; |
406 | 406 | ||
407 | u32 pseudo_palette[17]; | 407 | u32 pseudo_palette[16]; |
408 | struct { u8 red, green, blue, pad; } palette[256]; | 408 | struct { u8 red, green, blue, pad; } palette[256]; |
409 | 409 | ||
410 | #ifdef CONFIG_ZORRO | 410 | #ifdef CONFIG_ZORRO |
@@ -1603,14 +1603,14 @@ static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green, | |||
1603 | 1603 | ||
1604 | switch (info->var.bits_per_pixel) { | 1604 | switch (info->var.bits_per_pixel) { |
1605 | case 8: | 1605 | case 8: |
1606 | ((u8*)(info->pseudo_palette))[regno] = v; | 1606 | cinfo->pseudo_palette[regno] = v; |
1607 | break; | 1607 | break; |
1608 | case 16: | 1608 | case 16: |
1609 | ((u16*)(info->pseudo_palette))[regno] = v; | 1609 | cinfo->pseudo_palette[regno] = v; |
1610 | break; | 1610 | break; |
1611 | case 24: | 1611 | case 24: |
1612 | case 32: | 1612 | case 32: |
1613 | ((u32*)(info->pseudo_palette))[regno] = v; | 1613 | cinfo->pseudo_palette[regno] = v; |
1614 | break; | 1614 | break; |
1615 | } | 1615 | } |
1616 | return 0; | 1616 | return 0; |
@@ -2020,18 +2020,21 @@ static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo, | |||
2020 | const struct fb_fillrect *region) | 2020 | const struct fb_fillrect *region) |
2021 | { | 2021 | { |
2022 | int m; /* bytes per pixel */ | 2022 | int m; /* bytes per pixel */ |
2023 | u32 color = (cinfo->info->fix.visual == FB_VISUAL_TRUECOLOR) ? | ||
2024 | cinfo->pseudo_palette[region->color] : region->color; | ||
2025 | |||
2023 | if(cinfo->info->var.bits_per_pixel == 1) { | 2026 | if(cinfo->info->var.bits_per_pixel == 1) { |
2024 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, | 2027 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, |
2025 | region->dx / 8, region->dy, | 2028 | region->dx / 8, region->dy, |
2026 | region->width / 8, region->height, | 2029 | region->width / 8, region->height, |
2027 | region->color, | 2030 | color, |
2028 | cinfo->currentmode.line_length); | 2031 | cinfo->currentmode.line_length); |
2029 | } else { | 2032 | } else { |
2030 | m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8; | 2033 | m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8; |
2031 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, | 2034 | cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel, |
2032 | region->dx * m, region->dy, | 2035 | region->dx * m, region->dy, |
2033 | region->width * m, region->height, | 2036 | region->width * m, region->height, |
2034 | region->color, | 2037 | color, |
2035 | cinfo->currentmode.line_length); | 2038 | cinfo->currentmode.line_length); |
2036 | } | 2039 | } |
2037 | return; | 2040 | return; |
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index c60e5635498d..df16fcbff3fb 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -151,6 +151,7 @@ struct hfsplus_sb_info { | |||
151 | 151 | ||
152 | #define HFSPLUS_SB_WRITEBACKUP 0x0001 | 152 | #define HFSPLUS_SB_WRITEBACKUP 0x0001 |
153 | #define HFSPLUS_SB_NODECOMPOSE 0x0002 | 153 | #define HFSPLUS_SB_NODECOMPOSE 0x0002 |
154 | #define HFSPLUS_SB_FORCE 0x0004 | ||
154 | 155 | ||
155 | 156 | ||
156 | struct hfsplus_inode_info { | 157 | struct hfsplus_inode_info { |
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h index 5bad37cfdb29..b4fbed633219 100644 --- a/fs/hfsplus/hfsplus_raw.h +++ b/fs/hfsplus/hfsplus_raw.h | |||
@@ -123,11 +123,13 @@ struct hfsplus_vh { | |||
123 | } __packed; | 123 | } __packed; |
124 | 124 | ||
125 | /* HFS+ volume attributes */ | 125 | /* HFS+ volume attributes */ |
126 | #define HFSPLUS_VOL_UNMNT (1 << 8) | 126 | #define HFSPLUS_VOL_UNMNT (1 << 8) |
127 | #define HFSPLUS_VOL_SPARE_BLK (1 << 9) | 127 | #define HFSPLUS_VOL_SPARE_BLK (1 << 9) |
128 | #define HFSPLUS_VOL_NOCACHE (1 << 10) | 128 | #define HFSPLUS_VOL_NOCACHE (1 << 10) |
129 | #define HFSPLUS_VOL_INCNSTNT (1 << 11) | 129 | #define HFSPLUS_VOL_INCNSTNT (1 << 11) |
130 | #define HFSPLUS_VOL_SOFTLOCK (1 << 15) | 130 | #define HFSPLUS_VOL_NODEID_REUSED (1 << 12) |
131 | #define HFSPLUS_VOL_JOURNALED (1 << 13) | ||
132 | #define HFSPLUS_VOL_SOFTLOCK (1 << 15) | ||
131 | 133 | ||
132 | /* HFS+ BTree node descriptor */ | 134 | /* HFS+ BTree node descriptor */ |
133 | struct hfs_bnode_desc { | 135 | struct hfs_bnode_desc { |
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index cca0818aa4ca..935dafba0078 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c | |||
@@ -22,7 +22,7 @@ enum { | |||
22 | opt_umask, opt_uid, opt_gid, | 22 | opt_umask, opt_uid, opt_gid, |
23 | opt_part, opt_session, opt_nls, | 23 | opt_part, opt_session, opt_nls, |
24 | opt_nodecompose, opt_decompose, | 24 | opt_nodecompose, opt_decompose, |
25 | opt_err | 25 | opt_force, opt_err |
26 | }; | 26 | }; |
27 | 27 | ||
28 | static match_table_t tokens = { | 28 | static match_table_t tokens = { |
@@ -36,6 +36,7 @@ static match_table_t tokens = { | |||
36 | { opt_nls, "nls=%s" }, | 36 | { opt_nls, "nls=%s" }, |
37 | { opt_decompose, "decompose" }, | 37 | { opt_decompose, "decompose" }, |
38 | { opt_nodecompose, "nodecompose" }, | 38 | { opt_nodecompose, "nodecompose" }, |
39 | { opt_force, "force" }, | ||
39 | { opt_err, NULL } | 40 | { opt_err, NULL } |
40 | }; | 41 | }; |
41 | 42 | ||
@@ -145,6 +146,9 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) | |||
145 | case opt_nodecompose: | 146 | case opt_nodecompose: |
146 | sbi->flags |= HFSPLUS_SB_NODECOMPOSE; | 147 | sbi->flags |= HFSPLUS_SB_NODECOMPOSE; |
147 | break; | 148 | break; |
149 | case opt_force: | ||
150 | sbi->flags |= HFSPLUS_SB_FORCE; | ||
151 | break; | ||
148 | default: | 152 | default: |
149 | return 0; | 153 | return 0; |
150 | } | 154 | } |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 0ce1c455ae55..8093351bd7c3 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -251,16 +251,28 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data) | |||
251 | return 0; | 251 | return 0; |
252 | if (!(*flags & MS_RDONLY)) { | 252 | if (!(*flags & MS_RDONLY)) { |
253 | struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr; | 253 | struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr; |
254 | struct hfsplus_sb_info sbi; | ||
255 | |||
256 | memset(&sbi, 0, sizeof(struct hfsplus_sb_info)); | ||
257 | sbi.nls = HFSPLUS_SB(sb).nls; | ||
258 | if (!hfsplus_parse_options(data, &sbi)) | ||
259 | return -EINVAL; | ||
254 | 260 | ||
255 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { | 261 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { |
256 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " | 262 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " |
257 | "running fsck.hfsplus is recommended. leaving read-only.\n"); | 263 | "running fsck.hfsplus is recommended. leaving read-only.\n"); |
258 | sb->s_flags |= MS_RDONLY; | 264 | sb->s_flags |= MS_RDONLY; |
259 | *flags |= MS_RDONLY; | 265 | *flags |= MS_RDONLY; |
266 | } else if (sbi.flags & HFSPLUS_SB_FORCE) { | ||
267 | /* nothing */ | ||
260 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { | 268 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { |
261 | printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n"); | 269 | printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n"); |
262 | sb->s_flags |= MS_RDONLY; | 270 | sb->s_flags |= MS_RDONLY; |
263 | *flags |= MS_RDONLY; | 271 | *flags |= MS_RDONLY; |
272 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { | ||
273 | printk("HFS+-fs: Filesystem is marked journaled, leaving read-only.\n"); | ||
274 | sb->s_flags |= MS_RDONLY; | ||
275 | *flags |= MS_RDONLY; | ||
264 | } | 276 | } |
265 | } | 277 | } |
266 | return 0; | 278 | return 0; |
@@ -352,11 +364,19 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
352 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " | 364 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " |
353 | "running fsck.hfsplus is recommended. mounting read-only.\n"); | 365 | "running fsck.hfsplus is recommended. mounting read-only.\n"); |
354 | sb->s_flags |= MS_RDONLY; | 366 | sb->s_flags |= MS_RDONLY; |
367 | } else if (sbi->flags & HFSPLUS_SB_FORCE) { | ||
368 | /* nothing */ | ||
355 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { | 369 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { |
356 | if (!silent) | 370 | if (!silent) |
357 | printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n"); | 371 | printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n"); |
358 | sb->s_flags |= MS_RDONLY; | 372 | sb->s_flags |= MS_RDONLY; |
373 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { | ||
374 | if (!silent) | ||
375 | printk("HFS+-fs: write access to a jounaled filesystem is not supported, " | ||
376 | "use the force option at your own risk, mounting read-only.\n"); | ||
377 | sb->s_flags |= MS_RDONLY; | ||
359 | } | 378 | } |
379 | sbi->flags &= ~HFSPLUS_SB_FORCE; | ||
360 | 380 | ||
361 | /* Load metadata objects (B*Trees) */ | 381 | /* Load metadata objects (B*Trees) */ |
362 | HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); | 382 | HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 4b15761434bc..68b7b78638ff 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2757,6 +2757,15 @@ int journal_init(struct super_block *p_s_sb, const char *j_dev_name, | |||
2757 | journal->j_cnode_used = 0; | 2757 | journal->j_cnode_used = 0; |
2758 | journal->j_must_wait = 0; | 2758 | journal->j_must_wait = 0; |
2759 | 2759 | ||
2760 | if (journal->j_cnode_free == 0) { | ||
2761 | reiserfs_warning(p_s_sb, "journal-2004: Journal cnode memory " | ||
2762 | "allocation failed (%ld bytes). Journal is " | ||
2763 | "too large for available memory. Usually " | ||
2764 | "this is due to a journal that is too large.", | ||
2765 | sizeof (struct reiserfs_journal_cnode) * num_cnodes); | ||
2766 | goto free_and_return; | ||
2767 | } | ||
2768 | |||
2760 | init_journal_hash(p_s_sb); | 2769 | init_journal_hash(p_s_sb); |
2761 | jl = journal->j_current_jl; | 2770 | jl = journal->j_current_jl; |
2762 | jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl); | 2771 | jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl); |
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index 70ab56317380..c948f678e04e 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
@@ -86,12 +86,12 @@ struct proc_event { | |||
86 | pid_t process_pid; | 86 | pid_t process_pid; |
87 | pid_t process_tgid; | 87 | pid_t process_tgid; |
88 | union { | 88 | union { |
89 | uid_t ruid; /* current->uid */ | 89 | __u32 ruid; /* task uid */ |
90 | gid_t rgid; /* current->gid */ | 90 | __u32 rgid; /* task gid */ |
91 | } r; | 91 | } r; |
92 | union { | 92 | union { |
93 | uid_t euid; | 93 | __u32 euid; |
94 | gid_t egid; | 94 | __u32 egid; |
95 | } e; | 95 | } e; |
96 | } id; | 96 | } id; |
97 | 97 | ||
diff --git a/kernel/power/main.c b/kernel/power/main.c index 6ee2cad530e8..d253f3ae2fa5 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | DECLARE_MUTEX(pm_sem); | 25 | DECLARE_MUTEX(pm_sem); |
26 | 26 | ||
27 | struct pm_ops * pm_ops = NULL; | 27 | struct pm_ops *pm_ops; |
28 | suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN; | 28 | suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN; |
29 | 29 | ||
30 | /** | 30 | /** |
@@ -151,6 +151,18 @@ static char *pm_states[PM_SUSPEND_MAX] = { | |||
151 | #endif | 151 | #endif |
152 | }; | 152 | }; |
153 | 153 | ||
154 | static inline int valid_state(suspend_state_t state) | ||
155 | { | ||
156 | /* Suspend-to-disk does not really need low-level support. | ||
157 | * It can work with reboot if needed. */ | ||
158 | if (state == PM_SUSPEND_DISK) | ||
159 | return 1; | ||
160 | |||
161 | if (pm_ops && pm_ops->valid && !pm_ops->valid(state)) | ||
162 | return 0; | ||
163 | return 1; | ||
164 | } | ||
165 | |||
154 | 166 | ||
155 | /** | 167 | /** |
156 | * enter_state - Do common work of entering low-power state. | 168 | * enter_state - Do common work of entering low-power state. |
@@ -167,7 +179,7 @@ static int enter_state(suspend_state_t state) | |||
167 | { | 179 | { |
168 | int error; | 180 | int error; |
169 | 181 | ||
170 | if (pm_ops && pm_ops->valid && !pm_ops->valid(state)) | 182 | if (!valid_state(state)) |
171 | return -ENODEV; | 183 | return -ENODEV; |
172 | if (down_trylock(&pm_sem)) | 184 | if (down_trylock(&pm_sem)) |
173 | return -EBUSY; | 185 | return -EBUSY; |
@@ -238,9 +250,8 @@ static ssize_t state_show(struct subsystem * subsys, char * buf) | |||
238 | char * s = buf; | 250 | char * s = buf; |
239 | 251 | ||
240 | for (i = 0; i < PM_SUSPEND_MAX; i++) { | 252 | for (i = 0; i < PM_SUSPEND_MAX; i++) { |
241 | if (pm_states[i] && pm_ops && (!pm_ops->valid | 253 | if (pm_states[i] && valid_state(i)) |
242 | ||(pm_ops->valid && pm_ops->valid(i)))) | 254 | s += sprintf(s,"%s ", pm_states[i]); |
243 | s += sprintf(s,"%s ",pm_states[i]); | ||
244 | } | 255 | } |
245 | s += sprintf(s,"\n"); | 256 | s += sprintf(s,"\n"); |
246 | return (s - buf); | 257 | return (s - buf); |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 17ee7e5a3451..656476eedb1b 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -241,7 +241,8 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in | |||
241 | if (write) { | 241 | if (write) { |
242 | copy_to_user_page(vma, page, addr, | 242 | copy_to_user_page(vma, page, addr, |
243 | maddr + offset, buf, bytes); | 243 | maddr + offset, buf, bytes); |
244 | set_page_dirty_lock(page); | 244 | if (!PageCompound(page)) |
245 | set_page_dirty_lock(page); | ||
245 | } else { | 246 | } else { |
246 | copy_from_user_page(vma, page, addr, | 247 | copy_from_user_page(vma, page, addr, |
247 | buf, maddr + offset, bytes); | 248 | buf, maddr + offset, bytes); |