Re: Memory leak in 2.3.43pre2 (select.c changes)

From: Bill Wendling (wendling@ganymede.isdn.uiuc.edu)
Date: Tue Feb 08 2000 - 14:17:50 EST


Also sprach Manfred Spraul:
} Simon Kirby wrote:
} >
} > There's a memory leak in 2.3.43pre2 that showed visibly about 10 seconds
} > after starting X (I could see sawmill draw the window borders and
} > netscape felt slow),
}
} Yes, that was my patch. I merged another patch without single stepping
} it, and that patch removed required variables. Please apply the attached
} patch on top of 2.3.43-2.
}
} --- 2.3/fs/select.c Tue Feb 8 09:22:19 2000
} +++ build-2.3/fs/select.c Tue Feb 8 09:15:24 2000
} @@ -406,7 +408,7 @@
} {
} int i, j, fdcount, err;
} struct pollfd **fds;
} - poll_table *wait = NULL;
} + poll_table *wait_table, *wait;
} int nchunks, nleft;
}
} /* Do a sanity check on nfds ... */
} @@ -421,10 +423,12 @@
} timeout = MAX_SCHEDULE_TIMEOUT;
} }
}
} + wait = wait_table = NULL;
} if (timeout) {
} wait = alloc_wait(nfds);
} if (!wait)
} return -ENOMEM;
} + wait_table = wait;
} }
} err = -ENOMEM;
}
} @@ -487,6 +491,7 @@
} if (nfds != 0)
} kfree(fds);
} out:
} - free_wait(wait);
} + if(wait_table)
} + free_wait(wait_table);
} return err;
} }
Hi, Manfred,

I'm not sure why you added wait_table to this part of the code? Unlike in
the do_select() stuff, sys_poll() doesn't modify the wait variable. (Or,
does it do so now with your new code?)

Thanks.

-- 
|| Bill Wendling			wendling@ganymede.isdn.uiuc.edu

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:13 EST