lkml.org 
[lkml]   [2005]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] swsusp: do not use higher order memory allocations on suspend
Hi!

> > static inline void free_pagedir(struct pbe *pblist)
> > {
> > struct pbe *pbe;
> >
> > while (pblist) {
> > pbe = pblist + PB_PAGE_SKIP;
> > pblist = pbe->next;
> > free_page((unsigned long)pbe);
> > }
> > pr_debug("free_pagedir(): done\n");
> > }
> >
> > Should not you free_page(pblist) instead? This passes address in
> > middle of page to free_page, that seems wrong.
>
> Certainly. It should be something like that:
>
> while (pblist) {
> pbe = pblist;
> pblist = (pbe + PB_PAGE_SKIP)->next;
> free_page((unsigned long)pbe);
> }

Hmm, I see, my "fix" leaks one page of memory during each
suspend... I've fixed it properly now and will eventually propagete it
back.

This should be right..

while (pblist) {
pbe = (pblist + PB_PAGE_SKIP)->next;
free_page((unsigned long)pblist);
pblist = pbe;
}


Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.059 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site