Skip to content

Commit f9ed59f

Browse files
authored
Merge pull request #414 from msdx321/loader
capmgr: Fix two bugs in capmgr Looks great!
2 parents 00b8208 + bb08a30 commit f9ed59f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/components/implementation/capmgr/simple

src/components/implementation/capmgr/simple/capmgr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mm_page_alloc(struct cm_comp *c)
176176
if (ss_state_alloc(&m->comp)) BUG();
177177

178178
/* Allocate page, map page */
179-
p->page = crt_page_allocn(&c->comp, 1);
179+
p->page = crt_page_allocn(&cm_self()->comp, 1);
180180
if (!p->page) ERR_THROW(NULL, free_p);
181181
if (crt_page_aliasn_in(p->page, 1, &cm_self()->comp, &c->comp, &m->addr)) BUG();
182182

@@ -204,6 +204,7 @@ mm_page_allocn(struct cm_comp *c, unsigned long num_pages)
204204
if ((prev->page + 4096) != p->page) {
205205
BUG(); /* FIXME: handle concurrency */
206206
}
207+
prev = p;
207208
}
208209

209210
return initial;

0 commit comments

Comments
 (0)