mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Holding ref to /proc/<pid> dentry prevents task being freed
@ 2005-05-05  9:11 bmerry
  2005-05-05 16:34 ` Chris Wright
  0 siblings, 1 reply; 5+ messages in thread
From: bmerry @ 2005-05-05  9:11 UTC (permalink / raw)
  To: linux-kernel

[Please CC me on replies. I'm not subscribed to LKML]

Hi

I'm busy writing a security module that does some very basic ACL stuff
on a per-task basis. If my module obtains and holds a dentry for
/proc/<pid> (via path_lookup), then the task_free_security hook is
never called for that process. Since the module releases the dentry in
task_free_security, this creates a chicken-and-egg problem and neither
the task nor the dentry is ever released. A side-effect is that the
module refcount never drops to 0.

Perhaps the LSM framework needs a hook for a task exiting (transition
to zombie state), in addition to the task_free_security hook? That
would allow resources to be freed from zombies, including these types
of circular references.

Thanks
Bruce

[Please CC me on replies. I'm not subscribed to LKML]
-- 
/--------------------------------------------------------------------\
| Bruce Merry                      | bmerry at cs . uct . ac . za    |
| Proud user of Gentoo GNU/Linux   | http://www.cs.uct.ac.za/~bmerry |
|        Despite the high cost of living, it remains popular.        |
\--------------------------------------------------------------------/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-07  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-05  9:11 Holding ref to /proc/<pid> dentry prevents task being freed bmerry
2005-05-05 16:34 ` Chris Wright
2005-05-06  8:17   ` bmerry
2005-05-06 17:47     ` Chris Wright
2005-05-07  9:33       ` bmerry

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

Powered by JetHome