aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-ti.c
diff options
context:
space:
mode:
authorGerald Schaefer <[email protected]>2022-08-17 13:26:03 +0000
committerVasily Gorbik <[email protected]>2022-08-25 13:12:32 +0000
commit41ac42f137080bc230b5882e3c88c392ab7f2d32 (patch)
treed454e16d9988785b5de5426e2b29ad3c9e8637a3 /drivers/usb/cdns3/cdns3-ti.c
parents390: fix double free of GS and RI CBs on fork() failure (diff)
downloadkernel-41ac42f137080bc230b5882e3c88c392ab7f2d32.tar.gz
kernel-41ac42f137080bc230b5882e3c88c392ab7f2d32.zip
s390/mm: do not trigger write fault when vma does not allow VM_WRITE
For non-protection pXd_none() page faults in do_dat_exception(), we call do_exception() with access == (VM_READ | VM_WRITE | VM_EXEC). In do_exception(), vma->vm_flags is checked against that before calling handle_mm_fault(). Since commit 92f842eac7ee3 ("[S390] store indication fault optimization"), we call handle_mm_fault() with FAULT_FLAG_WRITE, when recognizing that it was a write access. However, the vma flags check is still only checking against (VM_READ | VM_WRITE | VM_EXEC), and therefore also calling handle_mm_fault() with FAULT_FLAG_WRITE in cases where the vma does not allow VM_WRITE. Fix this by changing access check in do_exception() to VM_WRITE only, when recognizing write access. Link: https://lkml.kernel.org/r/[email protected] Fixes: 92f842eac7ee3 ("[S390] store indication fault optimization") Cc: <[email protected]> Reported-by: David Hildenbrand <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions