Build scatterlist covering a process' text segment?
Jonathan Neuschäfer
j.neuschaefer at gmx.net
Fri Jun 17 11:10:14 EDT 2011
On Fri, Jun 17, 2011 at 02:47:25AM +0200, Arvid Brodin wrote:
[...]
> /**** User page code ****/
>
> pages = kmalloc(nr_pages * sizeof(*pages), GFP_KERNEL);
kcalloc?
You don't need the zeroing but the overflow check might be useful.
> if (!pages) {
> retval = -ENOMEM;
> goto err_pages;
> }
Greetings,
Jonathan Neuschäfer
More information about the Kernelnewbies
mailing list