summaryrefslogtreecommitdiff
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2009-12-15 16:47:27 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 07:20:09 -0800
commit7d6feeb287c61aafa88f06345387b1188edf4b86 (patch)
treeb07d1033d8980256d596686d75c2207b1f2cce0a /ipc/shm.c
parent1be53963b0519bd3681749a9bed8b83aeb005cca (diff)
ipc ns: fix memory leak (idr)
We have apparently had a memory leak since 7ca7e564e049d8b350ec9d958ff25eaa24226352 "ipc: store ipcs into IDRs" in 2007. The idr of which 3 exist for each ipc namespace is never freed. This patch simply frees them when the ipcns is freed. I don't believe any idr_remove() are done from rcu (and could therefore be delayed until after this idr_destroy()), so the patch should be safe. Some quick testing showed no harm, and the memory leak fixed. Caught by kmemleak. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 11bec626c228..e9b039f74129 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -101,6 +101,7 @@ static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
void shm_exit_ns(struct ipc_namespace *ns)
{
free_ipcs(ns, &shm_ids(ns), do_shm_rmid);
+ idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr);
}
#endif
ption value='libreoffice-5-1-2'>libreoffice-5-1-2 Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Expand)AuthorFilesLines
2019-11-30update translations for 6.2.8 rc2co-6.2-2co-6.2-1Christian Lohmaier14-79/+62
2019-11-30update translations for 6.2.8 rc1Christian Lohmaier92-1907/+1903
2019-09-27Translation update triggered by the new Print dialogAndras Timar352-114108/+173117
2019-09-22[cp] Revert rename of Master Slide DesignAndras Timar1-2/+2
2019-09-22[cp] Collabora support linkAndras Timar64-82/+82
2019-08-28update translations for 6.2.7Christian Lohmaier48-639/+609
2019-08-08update translations for 6.2.6 rc2Christian Lohmaier24-175/+162
2019-07-26update translations for 6.2.6 rc1Christian Lohmaier177-2270/+2273
2019-06-26update translations for 6.2.5 rc2Christian Lohmaier96-1161/+1175
2019-06-11update translations for 6.2.5 rc1cp-6.2-branch-pointChristian Lohmaier129-1486/+1502
2019-05-17update translations for 6.2.4 rc2Christian Lohmaier110-3528/+3532
2019-05-03update translations for 6.2.4 rc1Christian Lohmaier1285-95067/+87685
2019-04-09update translations for 6.2.3 rc2Christian Lohmaier24-694/+685
2019-03-29update translations for 6.2.3 rc1Christian Lohmaier102-2740/+2408
2019-03-15update translations for 6.2.2 rc2Christian Lohmaier158-6375/+8841
2019-03-04update templates for 6.2.2 rc1Christian Lohmaier165-12902/+12904
2019-02-24update translations for 6.2.1 rc2Christian Lohmaier203-10179/+9756
2019-02-11update translations for 6.2.1 rc1Christian Lohmaier1080-57369/+56386
2019-02-11Updated Slovenian translationAndras Timar20-356/+355
2019-01-23update translations for 6.2.0 rc3Christian Lohmaier480-15971/+16060
2019-01-14Updated Slovenian translationAndras Timar27-204/+213
2019-01-08update translations for 6.2.0 rc2Christian Lohmaier1455-29408/+24748
2019-01-02Updated Slovenian translationMartin Srebotnjak13-198/+142
2018-12-19update translations for 6.2.0 rc1Christian Lohmaier2447-308790/+318726
2018-12-19Updated Slovenian translationAndras Timar5-66/+68
2018-12-18Updated Slovenian translationAndras Timar17-911/+812
2018-12-09Updated Slovenian translationAndras Timar18-934/+959
2018-11-27Updated Slovenian translationAndras Timar44-38615/+38995
2018-11-17final update of translations for 6.2.0 beta1Christian Lohmaier715-130641/+153468
2018-11-16Galician: remove duplicated string that breaks help creationChristian Lohmaier1-8/+0
2018-11-15update translations for 6.2.0 beta1Christian Lohmaier1386-35012/+35227
2018-11-15Updated Slovenian translationAndras Timar29-735/+913
2018-11-14Updated Slovenian translationAndras Timar43-12487/+13062
2018-11-13update translations for masterChristian Lohmaier3869-1514831/+1542918
2018-10-27update translations for masterlibreoffice-6-2-branch-pointChristian Lohmaier350-7245/+6707
2018-10-22update translations for 6.2.0 alpha1Christian Lohmaier