From 69a7c50369ec1529e9cd6ca3989b254d78073379 Mon Sep 17 00:00:00 2001 From: Tommi Rantala Date: Fri, 8 Feb 2013 13:41:25 +0200 Subject: [PATCH] staging: dgrp: use correct release op for /proc/dgrp/info Trinity (the syscall fuzzer) discovered that reading /proc/dgrp/info was leaking some memory. Fix by using the correct release op in info_proc_file_ops. unreferenced object 0xffff88003b6696e0 (size 32): comm "cat", pid 2321, jiffies 4294705179 (age 29.434s) hex dump (first 32 bytes): 40 79 1c 81 ff ff ff ff 60 79 1c 81 ff ff ff ff @y......`y...... 50 79 1c 81 ff ff ff ff b0 62 89 81 ff ff ff ff Py.......b...... backtrace: [] kmemleak_alloc+0x21/0x50 [] kmem_cache_alloc_trace+0x11b/0x190 [] single_open+0x3c/0xc0 [] info_proc_open+0x15/0x20 [] proc_reg_open+0xb7/0x160 [] do_dentry_open+0x1cc/0x280 [] finish_open+0x4a/0x60 [] do_last+0xb07/0xdb0 [] path_openat+0xc2/0x4f0 [] do_filp_open+0x3c/0xa0 [] do_sys_open+0x11c/0x1c0 [] sys_open+0x1c/0x20 [] system_call_fastpath+0x16/0x1b [] 0xffffffffffffffff Signed-off-by: Tommi Rantala Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dgrp/dgrp_specproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c index e09fc9cf318b..cc868a2933eb 100644 --- a/drivers/staging/dgrp/dgrp_specproc.c +++ b/drivers/staging/dgrp/dgrp_specproc.c @@ -102,7 +102,7 @@ static struct file_operations info_proc_file_ops = { .open = info_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = single_release, }; static struct file_operations nodeinfo_proc_file_ops = {