On 6/20/2004 2:50 PM, Arnd Bergmann wrote: > I now noticed one more bug: > >> + * values at locations that are unknown to be aligned. >> + */ >> +#define __get_user_unaligned(x, ptr) \ >> +({ \ >> + __typeof__ (*(ptr)) __x = (x); \ >> + __copy_from_user(&__x, (ptr), sizeof(*(ptr))) ? -EFAULT : 0; \ >> +}) > > The assignment is done in the wrong direction, this needs to become > something like: > > #define __get_user_unaligned(x, ptr) \ > ({ \ > __typeof__ (*(ptr)) __x; \ > __copy_from_user(&__x, (ptr), sizeof(*(ptr))) ? -EFAULT : 0; \ > (x) = __x; \ > }) > > Hopefully that'll be the last change for this, the rest looks good to > me. Hope so! Take 3. -Arun