summaryrefslogtreecommitdiffstats
path: root/arch/arc/configs/tb10x_defconfig
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2018-06-19 17:22:05 +0300
committerVineet Gupta <vgupta@synopsys.com>2018-07-09 11:22:05 -0700
commite8708786d4fe21c043d38d760f768949a3d71185 (patch)
treed918e94ec1ee952d87d5948f4256d20103d19864 /arch/arc/configs/tb10x_defconfig
parentec58ba16e174d7ca24c8955a21cd0a53e0c32fdf (diff)
downloadlinux-stable-e8708786d4fe21c043d38d760f768949a3d71185.tar.gz
linux-stable-e8708786d4fe21c043d38d760f768949a3d71185.tar.bz2
linux-stable-e8708786d4fe21c043d38d760f768949a3d71185.zip
ARC: Improve cmpxchg syscall implementation
This is used in configs lacking hardware atomics to emulate atomic r-m-w for user space, implemented by disabling preemption in kernel. However there are issues in current implementation: 1. Process not terminated if invalid user pointer passed: i.e. __get_user() failed. 2. The reason for this patch was __put_user() failure not being handled either, specifically for the COW break scenario. The zero page is initially wired up and read from __get_user() succeeds. A subsequent write by __put_user() induces a Protection Violation, but COW can't finish as Linux page fault handler is disabled due to preempt disable. And what's worse is we silently return the stale value to user space. Fix this specific case by re-enabling preemption and explicitly fixing up the fault and retrying the whole sequence over. Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: linux-arch@vger.kernel.org Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> [vgupta: rewrote the changelog]
Diffstat (limited to 'arch/arc/configs/tb10x_defconfig')
0 files changed, 0 insertions, 0 deletions