I saw most usage of namei() codes are guarded by kernel_lock().
For example sys_newstat(), sys_stat() ,,,
Isn't it necessary to guard?
And also I don't understand why these functions need such a giant
kernel lock.
David S. Miller writes:
> This would work:
>
> mm_segment_t orig_fs;
>
> orig_fs = get_fs();
> set_fs(KERNEL_DS);
> err = namei("/tmp");
> set_fs(old_fs);
>
> The namei function expects user space pointers, you're sending
> it a kernel pointer, so you have to adjust your mm segment during
> the call.
--- Computer Systems Laboratory, Fujitsu Labs. kumon@flab.fujitsu.co.jp- 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 : Sun Apr 23 2000 - 21:00:12 EST