[PATCH] powerpc/cell: fix the prototype of create_vma_map

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 7 16:36:57 EST 2009


On Wed, 07 Jan 2009 14:34:59 +1100 Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> On Wed, 2009-01-07 at 10:58 +1100, Stephen Rothwell wrote:
> > Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
> > ---
> >  arch/powerpc/oprofile/cell/pr_util.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Arnd, I'm not too sure about this one, what do you think ? Shouldn't the
> objectid be a u64 and the callers be fixed instead ?

The *one* caller passes an "unsigned long" and in the function, objectid
(which is called __spu_elf_start there) is only cast to a "void __user *".
Don't we assume that all pointers (kernel and user) can fit into an
"unsigned long"?

Also the value originally comes from a notifier callback
(spu_active_notify) which is passed this value as an "unsigned long".

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090107/e5b31831/attachment.pgp>


More information about the Linuxppc-dev mailing list