Commit 44ec5f4
ARM: mm: fix alignment handler faults under memory pressure
[ Upstream commit 67e15fa ]
When the system has high memory pressure, the page containing the
instruction may be paged out. Using probe_kernel_address() means that
if the page is swapped out, the resulting page fault will not be
handled because page faults are disabled by this function.
Use get_user() to read the instruction instead.
Reported-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Fixes: b255188 ("ARM: fix scheduling while atomic warning in alignment handling code")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I189f5a65c949f6bd4785b5388175468657b2bb2b1 parent b8f9fa1 commit 44ec5f4
1 file changed
Lines changed: 36 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
770 | 800 | | |
771 | 801 | | |
772 | 802 | | |
773 | 803 | | |
774 | 804 | | |
775 | 805 | | |
776 | 806 | | |
777 | | - | |
778 | 807 | | |
779 | 808 | | |
780 | 809 | | |
| 810 | + | |
781 | 811 | | |
782 | 812 | | |
783 | 813 | | |
| |||
786 | 816 | | |
787 | 817 | | |
788 | 818 | | |
789 | | - | |
790 | | - | |
| 819 | + | |
| 820 | + | |
791 | 821 | | |
792 | 822 | | |
793 | 823 | | |
794 | 824 | | |
795 | | - | |
796 | | - | |
797 | | - | |
| 825 | + | |
| 826 | + | |
798 | 827 | | |
799 | 828 | | |
800 | 829 | | |
| |||
803 | 832 | | |
804 | 833 | | |
805 | 834 | | |
806 | | - | |
807 | | - | |
| 835 | + | |
808 | 836 | | |
809 | 837 | | |
810 | 838 | | |
| |||
0 commit comments