Commit 659c55e
mm/vma: return the exact errno in vms_gather_munmap_vmas()
__split_vma() and mas_store_gfp() returns several types of errno on
failure so don't ignore them in vms_gather_munmap_vmas(). For example,
__split_vma() returns -EINVAL when an unaligned huge page is unmapped.
This issue is reproduced by ltp memfd_create03 test.
Don't initialise the error variable and assign it when a failure actually
occurs.
[[email protected]: fix whitespace, per Liam]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 6898c90 ("mm/vma: extract the gathering of vmas from do_vmi_align_munmap()")
Signed-off-by: Xiao Yang <[email protected]>
Suggested-by: Lorenzo Stoakes <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Cc: "Liam R. Howlett" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent f2c5101 commit 659c55e
1 file changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
1174 | | - | |
| 1174 | + | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | | - | |
| 1180 | + | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
1194 | | - | |
| 1194 | + | |
| 1195 | + | |
1195 | 1196 | | |
| 1197 | + | |
1196 | 1198 | | |
1197 | 1199 | | |
1198 | 1200 | | |
1199 | 1201 | | |
1200 | 1202 | | |
1201 | 1203 | | |
1202 | 1204 | | |
1203 | | - | |
| 1205 | + | |
| 1206 | + | |
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
| |||
1220 | 1223 | | |
1221 | 1224 | | |
1222 | 1225 | | |
1223 | | - | |
| 1226 | + | |
| 1227 | + | |
1224 | 1228 | | |
1225 | 1229 | | |
1226 | 1230 | | |
1227 | 1231 | | |
1228 | | - | |
| 1232 | + | |
| 1233 | + | |
1229 | 1234 | | |
1230 | 1235 | | |
1231 | 1236 | | |
| |||
1255 | 1260 | | |
1256 | 1261 | | |
1257 | 1262 | | |
1258 | | - | |
1259 | | - | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1260 | 1266 | | |
1261 | 1267 | | |
1262 | 1268 | | |
| |||
0 commit comments