ARC: mm: do_page_fault refactor #7: fold the various error handling
authorVineet Gupta <vgupta@synopsys.com>
Tue, 14 May 2019 22:55:31 +0000 (15:55 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 1 Jul 2019 18:02:22 +0000 (11:02 -0700)
commit5e91bf5ce9b8740076f5283f1ec3a5b023950920
tree86ed8da02dd804bebc4e6eaed8d39f4c5a073117
parent98cb57ad70fb7c8a9c030d3e83fe66b546906e28
ARC: mm: do_page_fault refactor #7: fold the various error handling

 - single up_read() call vs. 4
 - so much easier on eyes

Technically it seems like @bad_area label moved up, but even in old
regime, it was a special case of delivering SIGSEGV unconditionally
which we now do as well, although with checks.

Also note that @fault needs to be initialized since we can land in
@bad_area (which reads it) without setting it up with return value of
handle_mm_fault() - failing to do so did bite us although as a side
effect of different patch: see [1]

[1]: http://lists.infradead.org/pipermail/linux-snps-arc/2019-May/005803.html

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/mm/fault.c