Posted on April 3rd, 2008 at 22:47 by fr3@K
Some months ago, I came across a mistake in Kernel command using Linux system calls, published by IBM’s developerWorks.
In the article, a listing of prototypes of two memory copy functions were as shown below:
unsigned long copy_from_user ( void *to, const void __user *from, unsigned long n ); unsigned long copy_to_user ( void *to, const void __user *from, unsigned long n );
The __user annotation, in the second function declaration (copy_to_user), should’ve been preceded by the first argument (to), but not by the second argument (from). Like this:
unsigned long copy_to_user( void __user * to, const void * from, unsigned long n);
I had submitted a comment regarding the mistake months ago. However, it remains uncorrected at the time of posting.
![]() |
|
| Previous Post « 懷舊: WRC 2001 Teaser « |
Next Post » Knock Knock, You’ve Been Hacked! » |







