On Tue, 1 Feb 2000, Javier Castillo wrote:
> I have a struct like this
> struct ..... = {
> ..............
> struct other_thing ** table
> }
>
> My problem is that copy_from_user does not copy the "table" correctly,
> well its elements. Is it normal?. If so, then I have to use
> "copy_from_user" to copy the "table" too?.
I don't know anything about copy_from_user, but if it is a memory copy
function then what is happening is that you are copying your first struct,
including a _pointer_ to your second struct, not the second struct itself.
Not only do you need to copy the second struct, but you also need to
update the first struct to point to the new copy of the second struct.
This might be a good time to write a function or macro to handle
duplicating your struct invisibly.
--
Kendall Lister, Systems Operator for Charon I.S. - [EMAIL PROTECTED]
Charon Information Services - Friendly, Cheap Melbourne ISP: 9589 7781
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]