Messages in this thread |  | | | Date | Wed, 12 Jul 2006 00:22:55 -0700 (PDT) | | Subject | Re: sparse annotation question | | From | David 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/
|  |