David Woodhouse <[EMAIL PROTECTED]> wrote:
> The code I posted yesterday is a bit of an abuse of the personality 
> mechanism, but ought to work nonetheless. Didn't you like it?

I didn't know how to get hold of a "struct pt_regs*" till someone sent me a
message this morning (it was obvious really). Plus, it occurred to me that I
already have this fd I can use for reference counting.

> [EMAIL PROTECTED] said:
> >  thus retaining the existence of the struct file, which then retains
> > the module in memory.
> 
> er.. why does it keep the module in memory?

Because "getting" the struct file from the fd increments the usage count on
the struct file. The VFS automatically maintains the module count pointed to
by the file_operations structure based on the existence of the struct file.

David Howells
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to