linux-kernel-test/arch
Chris Metcalf fc327e268f arch/tile: fix up some issues in calling do_work_pending()
First, we were at risk of handling thread-info flags, in particular
do_signal(), when returning from kernel space.  This could happen
after a failed kernel_execve(), or when forking a kernel thread.
The fix is to test in do_work_pending() for user_mode() and return
immediately if so; we already had this test for one of the flags,
so I just hoisted it to the top of the function.

Second, if a ptraced process updated the callee-saved registers
in the ptregs struct and then processed another thread-info flag, we
would overwrite the modifications with the original callee-saved
registers.  To fix this, we add a register to note if we've already
saved the registers once, and skip doing it on additional passes
through the loop.  To avoid a performance hit from the couple of
extra instructions involved, I modified the GET_THREAD_INFO() macro
to be guaranteed to be one instruction, then bundled it with adjacent
instructions, yielding an overall net savings.

Reported-By: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-05-16 16:01:16 -04:00
..
alpha alpha: silence 'const' warning in sys_marvel.c 2012-05-02 15:54:06 -04:00
arm ARM: SoC fixes for 3.4-rc 2012-05-12 17:27:41 -07:00
avr32 avr32: fix nop compile fails from system.h split up 2012-04-04 08:23:44 -07:00
blackfin blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c 2012-04-26 14:46:51 -04:00
c6x irq: Kill pointless irqd_to_hw export 2012-04-10 22:39:17 -06:00
cris Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
frv frv: fix warnings in mb93090-mb00/pci-dma.c about implicit EXPORT_SYMBOL 2012-04-02 14:41:26 -07:00
h8300 Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
hexagon hexagon: add missing cpu.h include 2012-04-23 12:57:24 -05:00
ia64 KVM: ia64: fix build due to typo 2012-05-09 13:53:28 +03:00
m32r Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
m68k m68knommu: enable qspi support when SPI_COLDFIRE_QSPI = m 2012-05-08 13:06:51 +10:00
microblaze Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
mips MIPS: Remove get_current_pgd(). 2012-04-27 17:16:29 +01:00
mn10300 Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
openrisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parisc parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
powerpc powerpc/irq: Fix another case of lazy IRQ state getting out of sync 2012-05-12 09:40:41 +10:00
s390 [S390] Fix compile error in swab.h 2012-04-11 14:28:26 +02:00
score Delete all instances of asm/system.h 2012-03-28 18:30:03 +01:00
sh sh: Fix up tracepoint build fallout from static key introduction. 2012-04-27 11:12:38 +09:30
sparc sparc64: Do not clobber %g2 in xcall_fetch_glob_regs(). 2012-05-10 11:00:46 -07:00
tile arch/tile: fix up some issues in calling do_work_pending() 2012-05-16 16:01:16 -04:00
um um: uml_setup_stubs': warning: unused variable 'pages' 2012-04-10 00:13:45 +02:00
unicore32 Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
x86 Merge git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-05-09 11:14:13 -07:00
xtensa xtensa: fix build fail on undefined ack_bad_irq 2012-04-26 18:35:32 -04:00
.gitignore
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-03-29 14:49:45 -07:00