lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d3b370d-8d93-8419-6c09-284259d85287@gmail.com>
Date:   Mon, 26 Jun 2017 17:44:38 +0800
From:   Joseph Qi <jiangqi903@...il.com>
To:     piaojun <piaojun@...wei.com>, mfasheh@...sity.com,
        jlbec@...lplan.org
Cc:     linux-kernel@...r.kernel.org,
        "ocfs2-devel@....oracle.com" <ocfs2-devel@....oracle.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: free 'dummy_sc' in sc_fop_release()
 in case of memory leak



On 17/6/25 20:46, piaojun wrote:
> 'sd->dbg_sock' is malloc in sc_common_open(), but not freed at the end
> of sc_fop_release().
> 
> Signed-off-by: Jun Piao <piaojun@...wei.com>
Looks good.
Reviewed-by: Joseph Qi <jiangqi903@...il.com>

Thanks,
Joseph

> ---
>  fs/ocfs2/cluster/netdebug.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c
> index 564c504..74a21f6 100644
> --- a/fs/ocfs2/cluster/netdebug.c
> +++ b/fs/ocfs2/cluster/netdebug.c
> @@ -426,6 +426,7 @@ static int sc_fop_release(struct inode *inode, struct file *file)
>  	struct o2net_sock_container *dummy_sc = sd->dbg_sock;
> 
>  	o2net_debug_del_sc(dummy_sc);
> +	kfree(dummy_sc);
>  	return seq_release_private(inode, file);
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ