From: Keith Owens <[email protected]>
Date: Wed, 12 Jul 2006 16:42:44 +1000
> I tried various combinations of __force, but kept getting this:
>
> warning: incorrect type in argument 1 (different address spaces)
> expected unsigned long *addr
> got unsigned long [noderef] [force] *[addressable] bsp<asn:1>
>
> What finally worked was
>
> unsigned long i, *bsp, __user *ubsp;
> ...
> ubsp = (unsigned long __user *) bsp;
> put_user(*contents, ubsp);
>
Right, I guess if you try to do the cast in the put_user() macro
argument, you'll run into troubles because the __chk_user_ptr(ptr)
call wants an absolutely pure __user pointer, not one that is part of
a __force cast.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]