Commit 1731f12
mm, slab: cleanup slab_bug() parameters
[ Upstream commit 4b183dd ]
slab_err() has variadic printf arguments but instead of passing them to
slab_bug() it does vsnprintf() to a buffer and passes %s, buf.
To allow passing them directly, turn slab_bug() to __slab_bug() with a
va_list parameter, and slab_bug() a wrapper with fmt, ... parameters.
Then slab_err() can call __slab_bug() without the intermediate buffer.
Also constify fmt everywhere, which also simplifies object_err()'s
call to slab_bug().
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Stable-dep-of: b4efcce ("mm/slub: avoid accessing metadata when pointer is invalid in object_err()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9cd3206f0126d9e1079fb8817629c16c0c6293fd)1 parent 8642167 commit 1731f12
1 file changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | | - | |
| 1030 | + | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1044 | 1053 | | |
1045 | | - | |
| 1054 | + | |
1046 | 1055 | | |
1047 | 1056 | | |
1048 | 1057 | | |
| |||
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
1101 | | - | |
| 1110 | + | |
1102 | 1111 | | |
1103 | 1112 | | |
1104 | 1113 | | |
1105 | 1114 | | |
1106 | | - | |
| 1115 | + | |
1107 | 1116 | | |
1108 | 1117 | | |
1109 | 1118 | | |
| |||
1139 | 1148 | | |
1140 | 1149 | | |
1141 | 1150 | | |
1142 | | - | |
1143 | 1151 | | |
1144 | 1152 | | |
1145 | 1153 | | |
1146 | 1154 | | |
1147 | 1155 | | |
1148 | | - | |
| 1156 | + | |
1149 | 1157 | | |
1150 | | - | |
| 1158 | + | |
1151 | 1159 | | |
1152 | 1160 | | |
1153 | 1161 | | |
| |||
1185 | 1193 | | |
1186 | 1194 | | |
1187 | 1195 | | |
1188 | | - | |
| 1196 | + | |
1189 | 1197 | | |
1190 | 1198 | | |
1191 | 1199 | | |
| |||
1200 | 1208 | | |
1201 | 1209 | | |
1202 | 1210 | | |
1203 | | - | |
| 1211 | + | |
1204 | 1212 | | |
1205 | 1213 | | |
1206 | 1214 | | |
| |||
0 commit comments