These are very different things, and are not interchangeable.
What do you think you are doing?
> And for this, I just did a straight assignment:
>
> This:
> memcpy_tofs(out, &si, sizeof(si));
>
> Became this:
> *out = si;
Wrong wrong wrong wrong wrong!
DO USE copy_to_user or put_user. First, it plugs big oops leaks.
Second, nice systems like m68k or Sparc64 put userland in a
completely different address space, so assignment won't even
pretend to begin to work.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/