All of lore.kernel.org
 help / color / mirror / Atom feed
* Avoid leaking unattached socket objects on restore
@ 2009-09-15 16:52 Dan Smith
       [not found] ` <1253033531-6764-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Smith @ 2009-09-15 16:52 UTC (permalink / raw)
  To: orenl-RdfvBDnrOixBDgjK7y7TUQ; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

When we restore socket objects that are not attached to a file, we leak
the struct socket object because only an fput(file) results in the
necessary sock_release().

This set provides a proposed solution to that problem by adding a cleanup
operation to the objhash operations structure which is called at objhash
teardown time.  This gives us the opportunity to call sock_release() on
sockets that we have put into the hash that were never attached to a file
and thus avoid the leak.

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

end of thread, other threads:[~2009-09-15 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15 16:52 Avoid leaking unattached socket objects on restore Dan Smith
     [not found] ` <1253033531-6764-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-15 16:52   ` [PATCH 1/2] Add a 'cleanup' function to objhash object operations Dan Smith
2009-09-15 16:52   ` [PATCH 2/2] Add a cleanup routine for objhash socket objects Dan Smith
     [not found]     ` <1253033531-6764-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-15 20:04       ` Serge E. Hallyn
2009-09-15 20:21       ` Matt Helsley
     [not found]         ` <20090915202118.GC10922-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-09-15 20:38           ` Dan Smith
     [not found]             ` <87eiq8j653.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-09-15 21:51               ` Oren Laadan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.