Commit d3e021a
x86/fpu: Fix the init_fpstate size check with the actual size
The init_fpstate buffer is statically allocated. Thus, the sanity test was
established to check whether the pre-allocated buffer is enough for the
calculated size or not.
The currently measured size is not strictly relevant. Fix to validate the
calculated init_fpstate size with the pre-allocated area.
Also, replace the sanity check function with open code for clarity. The
abstraction itself and the function naming do not tend to represent simply
what it does.
Fixes: 2ae996e ("x86/fpu: Calculate the default sizes independently")
Signed-off-by: Chang S. Bae <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent c32d7ca commit d3e021a
1 file changed
+6
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | 681 | | |
696 | 682 | | |
697 | 683 | | |
| |||
717 | 703 | | |
718 | 704 | | |
719 | 705 | | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | 706 | | |
725 | 707 | | |
726 | 708 | | |
| |||
879 | 861 | | |
880 | 862 | | |
881 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
882 | 870 | | |
883 | 871 | | |
884 | 872 | | |
| |||
0 commit comments