summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2014-07-16 09:19:16 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-17 09:03:58 -0700
commitf020cedd010180e759cb6cce817b8a60ea6311a1 (patch)
tree08e1d831e537bf8d34840e93c38cb157f923f7f3 /arch/alpha
parent33103cff2cb6a6f2753676ed9f82c4e3e7fe4e42 (diff)
downloadlinux-stable-f020cedd010180e759cb6cce817b8a60ea6311a1.tar.gz
linux-stable-f020cedd010180e759cb6cce817b8a60ea6311a1.tar.bz2
linux-stable-f020cedd010180e759cb6cce817b8a60ea6311a1.zip
MIPS: Remove BUG_ON(!is_fpu_owner()) in do_ade()
commit 2e5767a27337812f6850b3fa362419e2f085e5c3 upstream. In do_ade(), is_fpu_owner() isn't preempt-safe. For example, when an unaligned ldc1 is executed, do_cpu() is called and then FPU will be enabled (and TIF_USEDFPU will be set for the current process). Then, do_ade() is called because the access is unaligned. If the current process is preempted at this time, TIF_USEDFPU will be cleard. So when the process is scheduled again, BUG_ON(!is_fpu_owner()) is triggered. This small program can trigger this BUG in a preemptible kernel: int main (int argc, char *argv[]) { double u64[2]; while (1) { asm volatile ( ".set push \n\t" ".set noreorder \n\t" "ldc1 $f3, 4(%0) \n\t" ".set pop \n\t" ::"r"(u64): ); } return 0; } V2: Remove the BUG_ON() unconditionally due to Paul's suggestion. Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Jie Chen <chenj@lemote.com> Signed-off-by: Rui Wang <wangr@lemote.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/alpha')
0 files changed, 0 insertions, 0 deletions