diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-22 19:46:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-22 19:46:29 -0400 |
commit | 5fd52203e1856ad925b1a6adae9a22e533da94e2 (patch) | |
tree | 9c1943df7bb47a5170a855a301beb69c6ebd6db3 | |
parent | 5453e7723b95958f4591b2e0063573d8d53e7699 (diff) | |
parent | a66aa704d6f332b001dfb0e787c92b2c61c75081 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] fix kmalloc(0) in arch/ia64/pci/pci.c
[IA64] Only unwind non-running tasks.
[IA64] Improve unwind checking.
[IA64] Yet another section mismatch warning
[IA64] Fix bogus messages about system calls not implemented.
-rw-r--r-- | arch/ia64/kernel/process.c | 5 | ||||
-rw-r--r-- | arch/ia64/kernel/unwind.c | 21 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 11 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 2 | ||||
-rw-r--r-- | include/asm-ia64/unistd.h | 13 |
5 files changed, 40 insertions, 12 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index d1c3ed9943e5..af73b8dfde28 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -763,6 +763,9 @@ get_wchan (struct task_struct *p) | |||
763 | unsigned long ip; | 763 | unsigned long ip; |
764 | int count = 0; | 764 | int count = 0; |
765 | 765 | ||
766 | if (!p || p == current || p->state == TASK_RUNNING) | ||
767 | return 0; | ||
768 | |||
766 | /* | 769 | /* |
767 | * Note: p may not be a blocked task (it could be current or | 770 | * Note: p may not be a blocked task (it could be current or |
768 | * another process running on some other CPU. Rather than | 771 | * another process running on some other CPU. Rather than |
@@ -773,6 +776,8 @@ get_wchan (struct task_struct *p) | |||
773 | */ | 776 | */ |
774 | unw_init_from_blocked_task(&info, p); | 777 | unw_init_from_blocked_task(&info, p); |
775 | do { | 778 | do { |
779 | if (p->state == TASK_RUNNING) | ||
780 | return 0; | ||
776 | if (unw_unwind(&info) < 0) | 781 | if (unw_unwind(&info) < 0) |
777 | return 0; | 782 | return 0; |
778 | unw_get_ip(&info, &ip); | 783 | unw_get_ip(&info, &ip); |
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c index 7d3dd6cdafa4..b0b08b5f3eca 100644 --- a/arch/ia64/kernel/unwind.c +++ b/arch/ia64/kernel/unwind.c | |||
@@ -1860,7 +1860,7 @@ int | |||
1860 | unw_unwind (struct unw_frame_info *info) | 1860 | unw_unwind (struct unw_frame_info *info) |
1861 | { | 1861 | { |
1862 | unsigned long prev_ip, prev_sp, prev_bsp; | 1862 | unsigned long prev_ip, prev_sp, prev_bsp; |
1863 | unsigned long ip, pr, num_regs; | 1863 | unsigned long ip, pr, num_regs, rp_loc, pfs_loc; |
1864 | STAT(unsigned long start, flags;) | 1864 | STAT(unsigned long start, flags;) |
1865 | int retval; | 1865 | int retval; |
1866 | 1866 | ||
@@ -1870,14 +1870,16 @@ unw_unwind (struct unw_frame_info *info) | |||
1870 | prev_sp = info->sp; | 1870 | prev_sp = info->sp; |
1871 | prev_bsp = info->bsp; | 1871 | prev_bsp = info->bsp; |
1872 | 1872 | ||
1873 | /* restore the ip */ | 1873 | /* validate the return IP pointer */ |
1874 | if (!info->rp_loc) { | 1874 | rp_loc = (unsigned long) info->rp_loc; |
1875 | if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) { | ||
1875 | /* FIXME: should really be level 0 but it occurs too often. KAO */ | 1876 | /* FIXME: should really be level 0 but it occurs too often. KAO */ |
1876 | UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", | 1877 | UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", |
1877 | __FUNCTION__, info->ip); | 1878 | __FUNCTION__, info->ip); |
1878 | STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); | 1879 | STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); |
1879 | return -1; | 1880 | return -1; |
1880 | } | 1881 | } |
1882 | /* restore the ip */ | ||
1881 | ip = info->ip = *info->rp_loc; | 1883 | ip = info->ip = *info->rp_loc; |
1882 | if (ip < GATE_ADDR) { | 1884 | if (ip < GATE_ADDR) { |
1883 | UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip); | 1885 | UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip); |
@@ -1885,12 +1887,14 @@ unw_unwind (struct unw_frame_info *info) | |||
1885 | return -1; | 1887 | return -1; |
1886 | } | 1888 | } |
1887 | 1889 | ||
1888 | /* restore the cfm: */ | 1890 | /* validate the previous stack frame pointer */ |
1889 | if (!info->pfs_loc) { | 1891 | pfs_loc = (unsigned long) info->pfs_loc; |
1892 | if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) { | ||
1890 | UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); | 1893 | UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); |
1891 | STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); | 1894 | STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); |
1892 | return -1; | 1895 | return -1; |
1893 | } | 1896 | } |
1897 | /* restore the cfm: */ | ||
1894 | info->cfm_loc = info->pfs_loc; | 1898 | info->cfm_loc = info->pfs_loc; |
1895 | 1899 | ||
1896 | /* restore the bsp: */ | 1900 | /* restore the bsp: */ |
@@ -1992,13 +1996,16 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t, | |||
1992 | memset(info, 0, sizeof(*info)); | 1996 | memset(info, 0, sizeof(*info)); |
1993 | 1997 | ||
1994 | rbslimit = (unsigned long) t + IA64_RBS_OFFSET; | 1998 | rbslimit = (unsigned long) t + IA64_RBS_OFFSET; |
1999 | stklimit = (unsigned long) t + IA64_STK_OFFSET; | ||
2000 | |||
1995 | rbstop = sw->ar_bspstore; | 2001 | rbstop = sw->ar_bspstore; |
1996 | if (rbstop - (unsigned long) t >= IA64_STK_OFFSET) | 2002 | if (rbstop > stklimit || rbstop < rbslimit) |
1997 | rbstop = rbslimit; | 2003 | rbstop = rbslimit; |
1998 | 2004 | ||
1999 | stklimit = (unsigned long) t + IA64_STK_OFFSET; | ||
2000 | if (stktop <= rbstop) | 2005 | if (stktop <= rbstop) |
2001 | stktop = rbstop; | 2006 | stktop = rbstop; |
2007 | if (stktop > stklimit) | ||
2008 | stktop = stklimit; | ||
2002 | 2009 | ||
2003 | info->regstk.limit = rbslimit; | 2010 | info->regstk.limit = rbslimit; |
2004 | info->regstk.top = rbstop; | 2011 | info->regstk.top = rbstop; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 3549f3b42592..73696b4a2eed 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -354,10 +354,13 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | |||
354 | 354 | ||
355 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, | 355 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, |
356 | &windows); | 356 | &windows); |
357 | controller->window = kmalloc_node(sizeof(*controller->window) * windows, | 357 | if (windows) { |
358 | GFP_KERNEL, controller->node); | 358 | controller->window = |
359 | if (!controller->window) | 359 | kmalloc_node(sizeof(*controller->window) * windows, |
360 | goto out2; | 360 | GFP_KERNEL, controller->node); |
361 | if (!controller->window) | ||
362 | goto out2; | ||
363 | } | ||
361 | 364 | ||
362 | name = kmalloc(16, GFP_KERNEL); | 365 | name = kmalloc(16, GFP_KERNEL); |
363 | if (!name) | 366 | if (!name) |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index a574fcd163dd..684b1c984a44 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -194,7 +194,7 @@ void __init early_sn_setup(void) | |||
194 | } | 194 | } |
195 | 195 | ||
196 | extern int platform_intr_list[]; | 196 | extern int platform_intr_list[]; |
197 | static int __initdata shub_1_1_found; | 197 | static int __cpuinitdata shub_1_1_found; |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * sn_check_for_wars | 200 | * sn_check_for_wars |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index d7781a2ddefe..441c9e001776 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -305,6 +305,19 @@ | |||
305 | 305 | ||
306 | #define NR_syscalls 286 /* length of syscall table */ | 306 | #define NR_syscalls 286 /* length of syscall table */ |
307 | 307 | ||
308 | /* | ||
309 | * The following defines stop scripts/checksyscalls.sh from complaining about | ||
310 | * unimplemented system calls. Glibc provides for each of these by using | ||
311 | * more modern equivalent system calls. | ||
312 | */ | ||
313 | #define __IGNORE_fork /* clone() */ | ||
314 | #define __IGNORE_time /* gettimeofday() */ | ||
315 | #define __IGNORE_alarm /* setitimer(ITIMER_REAL, ... */ | ||
316 | #define __IGNORE_pause /* rt_sigprocmask(), rt_sigsuspend() */ | ||
317 | #define __IGNORE_utime /* utimes() */ | ||
318 | #define __IGNORE_getpgrp /* getpgid() */ | ||
319 | #define __IGNORE_vfork /* clone() */ | ||
320 | |||
308 | #define __ARCH_WANT_SYS_RT_SIGACTION | 321 | #define __ARCH_WANT_SYS_RT_SIGACTION |
309 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 322 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
310 | 323 | ||