free_memblock() currently uses list_for_each_entry() to iterate over the free list, and may delete an entry over which it iterates. While there is no way that the deleted list entry could be overwritten before we reference it, this does rely upon list_del() leaving the "next" pointer intact, which is not guaranteed. Discovered while tracking down a list-corruption bug (as a result of having modified list_del() to sanitise the deleted list entry). Fix by using list_for_each_entry_safe(). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
196 |
|
196 |
|
197 |
|
197 |
|
198 |
|
198 |
|
|
199 |
|
|
199 |
|
200 |
|
200 |
|
201 |
|
201 |
|
202 |
|
|
|
||
212 |
|
213 |
|
213 |
|
214 |
|
214 |
|
215 |
|
215 |
|
|
|
|
216 |
|
|
216 |
|
217 |
|
217 |
|
218 |
|
218 |
|
219 |
|