Jonathan, it's kmalloc(), not kcalloc().

On 17 Haz 2011, at 18:10, Jonathan Neuschäfer <[email protected]> wrote:

> 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
> 
> _______________________________________________
> Kernelnewbies mailing list
> [email protected]
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to