全部博文(76)
分类:
2010-04-09 13:10:53
mm_segment_t old_fs;
old_fs = get_fs();
set_fs (KERNEL_DS);
........
set_fs(old_fs)
If you want to invoke a sys call from the kernel space, then you need to save the
kernel data segment before the call and restore that after you are done.
The piece of code you mention does exactly that.