Chinaunix首页 | 论坛 | 博客
  • 博客访问: 86807
  • 博文数量: 10
  • 博客积分: 2055
  • 博客等级: 大尉
  • 技术积分: 370
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-30 16:59
文章分类
文章存档

2011年(1)

2008年(9)

我的朋友

分类: LINUX

2008-04-17 12:27:33


     Because product schedule , I try to tidy out some useful message about kernel coding . Maybe we should change the ugly code.

this article is about proc system's copy_from/to_user:

1 . they should not be called in atomic context.
2 . you can use
the atomic version (__copy_[to|from]_user) instead when in atomic. at the same time , you must check  user address is valid with access_ok in user context.
3 .
before processing the user data in write_proc, we'd better copy them into kernel context with copy_from_user.
阅读(514) | 评论(0) | 转发(0) |
0

上一篇:del_timer and del_timer_sync

下一篇:Vmalloc notice

给主人留下些什么吧!~~