lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 12 Jul 2006 00:22:55 -0700 (PDT)
SubjectRe: sparse annotation question
FromDavid Miller <>
From: Keith Owens <kaos@ocs.com.au>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-12 09:25    [from the cache]
©2003-2009