Question on IS_ERR

From: jidong xiao
Date: Thu Aug 09 2007 - 01:36:56 EST


I saw we call IS_ERR(ptr) after executing kthread_run() each time.
But we don't need to call IS_ERR(ptr) after kmalloc().

My understanding is,
the kernel pointer ptr for IS_ERR to check should be page aligned, so
its kernel address should be less than 0xfffff000(or 0xffff ffff ffff
f000, 64bits),

kthread_run returns a struct task_struct pointer,which is always page aligned,
however the pointer returned by kmalloc() might not be page aligned,
so we cannot use IS_ERR to check.

Is my understanding correct?

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