From d3eac1e59e068cf033f850ab8be016beccf9726d Mon Sep 17 00:00:00 2001 From: Weston Andros Adamson Date: Wed, 20 Nov 2013 12:46:20 -0500 Subject: gssd: Fix file descriptor leak of old pipe dirs gssd doesn't properly clean up internal state for old pipes and never closes the (since deleted) clnt_info directory. This leads to eventual fd exhaustion. To reproduce, run a lot of mount / umounts in a loop and watch the output of 'ls /proc/$PID/fdinfo | wc -l' (where PID is the pid of gssd) steadily grow until gssd eventually crashes with "Too many open files". This regression was introduced by 841e83c1, which was trying to fix a similar bug in the skip matching logic of update_old_clients. The problem with that patch is that pdir will never match dirname, because dirname is "/clntXXX". Signed-off-by: Weston Andros Adamson Signed-off-by: Steve Dickson --- utils/gssd/gssd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/gssd/gssd.h') diff --git a/utils/gssd/gssd.h b/utils/gssd/gssd.h index 86472a1..e44ea40 100644 --- a/utils/gssd/gssd.h +++ b/utils/gssd/gssd.h @@ -73,6 +73,7 @@ TAILQ_HEAD(clnt_list_head, clnt_info) clnt_list; struct clnt_info { TAILQ_ENTRY(clnt_info) list; char *dirname; + char *pdir; int dir_fd; char *servicename; char *servername; -- cgit