Discussion:
unused fs/jffs2/acl.c:jffs2_clear_acl()
Adrian Bunk
2006-06-29 13:01:34 UTC
Permalink
Hi David,

it might not have been intended that jffs2_clear_acl() in Linus' tree is
unused?

cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
David Woodhouse
2006-06-29 13:16:10 UTC
Permalink
Post by Adrian Bunk
it might not have been intended that jffs2_clear_acl() in Linus' tree
is unused?
I suspect you're right -- thanks for pointing it out.

Kaigai-san?
--
dwmw2
KaiGai Kohei
2006-06-29 14:27:32 UTC
Permalink
Post by David Woodhouse
Post by Adrian Bunk
it might not have been intended that jffs2_clear_acl() in Linus' tree
is unused?
I suspect you're right -- thanks for pointing it out.
Kaigai-san?
I'm sorry, it's a serious BUG.
When an inode is cleared, jffs2_clear_acl() should be called
to release on-memory ACL. Because the current implementation
didn't care about this cleaning-up, we have memory-leaking.

Please wait a patch for a while.

Thanks,
--
KaiGai Kohei <***@kaigai.gr.jp>
KaiGai Kohei
2006-07-02 14:08:09 UTC
Permalink
[JFFS2][XATTR] Fix memory leak in POSIX-ACL support

* jffs2-xattr-v6.2-02-fix-posix_acl-memory-leak.patch

jffs2_clear_acl() which releases acl caches allocated by kmalloc()
was defined but it was never called. Thus, we faced to the risk
of memory leaking.

This patch plugs jffs2_clear_acl() into jffs2_do_clear_inode().
It ensures to release acl cache when inode is cleared.

Signed-off-by: KaiGai Kohei <***@ak.jp.nec.com>

Thanks,
Post by KaiGai Kohei
Post by David Woodhouse
Post by Adrian Bunk
it might not have been intended that jffs2_clear_acl() in Linus' tree
is unused?
I suspect you're right -- thanks for pointing it out.
Kaigai-san?
I'm sorry, it's a serious BUG.
When an inode is cleared, jffs2_clear_acl() should be called
to release on-memory ACL. Because the current implementation
didn't care about this cleaning-up, we have memory-leaking.
Please wait a patch for a while.
Thanks,
--
KaiGai Kohei <***@kaigai.gr.jp>
Loading...