转自:http://blog.csdn.net/echoisland/article/details/7101097
http://lxr.oss.org.cn/source/fs/exec.c
798 int kernel_read(struct file *file, loff_t offset, 799 char *addr, unsigned long count) 800 { 801 mm_segment_t old_fs; 802 loff_t pos = offset; 803 int result; 804 805 old_fs = get_fs(); 806 set_fs(get_ds()); 807 /* The cast to a user pointer is valid due to the set_fs() */ 808 result = vfs_read(file, (void __user *)addr, count, &pos); 809 set_fs(old_fs); 810 return result; 811 } 812
813 EXPORT_SYMBOL(kernel_read);
本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sky-heaven/p/5549360.html,如需转载请自行联系原作者