safe usage of remove_proc_entry and proc_entry->data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I just wondered (after using this for years...) what the safe usage of
remove_proc_entry() is when I've registered a dynamic data object with
the proc-entry during creation. I'm creating and deleting proc entries
dynamically, not on module insertion/removal.

What is the clean way to synchronise e.g. an ongoing proc read request
on that entry and its access to the embedded data object vs. the
deregistration and later release of the data object?
remove_proc_entry() is non-blocking and does unfortunately not return
any error in case the deletion is deferred.

In the procfs-guide, I read that I should "free the data entry from
the struct proc_dir_entry *before* [calling] remove_proc_entry()".
Doesn't parse for me so far (how should this help?), and I failed to
find a pattern for this in existing kernel code. Any hints welcome!

Thanks in advance,
Jan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux