x86/fpu/signal: Move initial checks into fpu__restore_sig()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:02:25 +0000 (14:02 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 17:59:57 +0000 (19:59 +0200)
commit99a5901951b70251965b0d1542d4a8c616842a99
tree70ed262ce12c1b64082cee0da8775efacffd6456
parentbf68a7d98922e1665019b8bf0c4791500837c857
x86/fpu/signal: Move initial checks into fpu__restore_sig()

__fpu__restore_sig() is convoluted and some of the basic checks can
trivially be done in the calling function as well as the final error
handling of clearing user state.

 [ bp: Fixup typos. ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121457.086336154@linutronix.de
arch/x86/kernel/fpu/signal.c