mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* safe usage of remove_proc_entry and proc_entry->data
@ 2006-03-31 16:10 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2006-03-31 16:10 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-31 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-31 16:10 safe usage of remove_proc_entry and proc_entry->data Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®