Let DDB's buf printer handle NULL pointers in the buf page array.
A buf's b_pages and b_npages fields may be inconsistent after a panic. For instance, vfs_vmio_invalidate() sets b_npages to zero only after all pages are unwired and their page array entries are cleared. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
5d94bbc241
commit
0649caae32
@ -4725,8 +4725,12 @@ DB_SHOW_COMMAND(buffer, db_show_buffer)
|
||||
for (i = 0; i < bp->b_npages; i++) {
|
||||
vm_page_t m;
|
||||
m = bp->b_pages[i];
|
||||
db_printf("(%p, 0x%lx, 0x%lx)", (void *)m->object,
|
||||
(u_long)m->pindex, (u_long)VM_PAGE_TO_PHYS(m));
|
||||
if (m != NULL)
|
||||
db_printf("(%p, 0x%lx, 0x%lx)", m->object,
|
||||
(u_long)m->pindex,
|
||||
(u_long)VM_PAGE_TO_PHYS(m));
|
||||
else
|
||||
db_printf("( ??? )");
|
||||
if ((i + 1) < bp->b_npages)
|
||||
db_printf(",");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user