The Samba-Bugzilla – Attachment 12246 Details for
Bug 11999
Winbind leaks memory with each cached credentials login
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.4
4.4.patch (text/plain), 1.74 KB, created by
Andreas Schneider
on 2016-06-30 06:13:43 UTC
(
hide
)
Description:
patch for 4.4
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2016-06-30 06:13:43 UTC
Size:
1.74 KB
patch
obsolete
>From f8d4a51b02abd2f7bb4c5a874d8d83f4dedc7a6a Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Wed, 29 Jun 2016 13:38:19 +0200 >Subject: [PATCH] s3-winbind: Fix memory leak with each cached credential login > >When we allow offline logon and have a lot of logins, windbind will leak >4k of memory which each log in. On systems with heavy load this can grow >quickly and the OOM killer will kill Winbind. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11999 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> > >Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> >Autobuild-Date(master): Wed Jun 29 19:03:53 CEST 2016 on sn-devel-144 > >(cherry picked from commit 826f61960ec74deedc9d556a3b8fe04d9178dcd8) >--- > source3/winbindd/winbindd_cache.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c >index cf3ed71..5dd9f4f 100644 >--- a/source3/winbindd/winbindd_cache.c >+++ b/source3/winbindd/winbindd_cache.c >@@ -3471,7 +3471,7 @@ NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const > struct winbind_cache *cache = get_cache(domain); > NTSTATUS status; > int ret; >- struct cred_list *cred, *oldest = NULL; >+ struct cred_list *cred, *next, *oldest = NULL; > > if (!cache->tdb) { > return NT_STATUS_INTERNAL_DB_ERROR; >@@ -3540,7 +3540,11 @@ NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const > status = NT_STATUS_UNSUCCESSFUL; > } > done: >- SAFE_FREE(wcache_cred_list); >+ for (cred = wcache_cred_list; cred; cred = next) { >+ next = cred->next; >+ DLIST_REMOVE(wcache_cred_list, cred); >+ SAFE_FREE(cred); >+ } > SAFE_FREE(oldest); > > return status; >-- >2.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
jra
:
review+
Actions:
View
Attachments on
bug 11999
:
12233
|
12245
| 12246