Commit 09d49eb
ocfs2: reduce ioctl stack usage
On 32-bit architectures with KASAN_STACK enabled, the total stack usage of
the ocfs2_ioctl function grows beyond the warning limit:
fs/ocfs2/ioctl.c: In function 'ocfs2_ioctl':
fs/ocfs2/ioctl.c:934:1: error: the frame size of 1448 bytes is larger than 1400 bytes [-Werror=frame-larger-than=]
Move each of the variables into a basic block, and mark
ocfs2_info_handle() as noinline_for_stack, in order to have the variable
share stack slots.
Link: https://lkml.kernel.org/r/20230417205631.1956027-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 522dc4e commit 09d49eb
1 file changed
Lines changed: 26 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
807 | | - | |
| 806 | + | |
| 807 | + | |
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | 843 | | |
| 844 | + | |
853 | 845 | | |
854 | 846 | | |
855 | 847 | | |
856 | 848 | | |
857 | 849 | | |
858 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
859 | 854 | | |
860 | 855 | | |
861 | 856 | | |
862 | 857 | | |
| 858 | + | |
863 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
864 | 863 | | |
865 | 864 | | |
866 | 865 | | |
| |||
873 | 872 | | |
874 | 873 | | |
875 | 874 | | |
| 875 | + | |
876 | 876 | | |
877 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
878 | 881 | | |
879 | 882 | | |
880 | 883 | | |
| |||
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
| 893 | + | |
890 | 894 | | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
891 | 901 | | |
892 | 902 | | |
893 | 903 | | |
894 | 904 | | |
895 | 905 | | |
896 | 906 | | |
897 | 907 | | |
| 908 | + | |
898 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
899 | 913 | | |
900 | 914 | | |
901 | 915 | | |
902 | 916 | | |
| 917 | + | |
903 | 918 | | |
904 | 919 | | |
905 | 920 | | |
| |||
0 commit comments