Commit e50e042
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)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>1 parent ea0bb07 commit e50e042
1 file changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | | - | |
| 1034 | + | |
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
| 1039 | + | |
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1048 | 1057 | | |
1049 | | - | |
| 1058 | + | |
1050 | 1059 | | |
1051 | 1060 | | |
1052 | 1061 | | |
| |||
1102 | 1111 | | |
1103 | 1112 | | |
1104 | 1113 | | |
1105 | | - | |
| 1114 | + | |
1106 | 1115 | | |
1107 | 1116 | | |
1108 | 1117 | | |
1109 | 1118 | | |
1110 | | - | |
| 1119 | + | |
1111 | 1120 | | |
1112 | 1121 | | |
1113 | 1122 | | |
| |||
1143 | 1152 | | |
1144 | 1153 | | |
1145 | 1154 | | |
1146 | | - | |
1147 | 1155 | | |
1148 | 1156 | | |
1149 | 1157 | | |
1150 | 1158 | | |
1151 | 1159 | | |
1152 | | - | |
| 1160 | + | |
1153 | 1161 | | |
1154 | | - | |
| 1162 | + | |
1155 | 1163 | | |
1156 | 1164 | | |
1157 | 1165 | | |
| |||
1189 | 1197 | | |
1190 | 1198 | | |
1191 | 1199 | | |
1192 | | - | |
| 1200 | + | |
1193 | 1201 | | |
1194 | 1202 | | |
1195 | 1203 | | |
| |||
1204 | 1212 | | |
1205 | 1213 | | |
1206 | 1214 | | |
1207 | | - | |
| 1215 | + | |
1208 | 1216 | | |
1209 | 1217 | | |
1210 | 1218 | | |
| |||
0 commit comments