]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix /proc/net/sctp/ memory leak
authorTommi Rantala <tt.rantala@gmail.com>
Thu, 15 Nov 2012 03:49:05 +0000 (03:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2012 18:56:05 +0000 (13:56 -0500)
commit89cb71128143d7b9207c7ea1001ea2e6ec70ecd1
tree1ee9ef7eb473db6407f13d6bd1adf537fbc76344
parenta17cbcfc801141b8f88b425f5017cec93f04122d
sctp: fix /proc/net/sctp/ memory leak

Commit 8964f1c ("sctp: Make the proc files per network namespace.")
changed the /proc/net/sctp/ struct file_operations opener functions to
use single_open_net() and seq_open_net().

Avoid leaking memory by using single_release_net() and seq_release_net()
as the release functions.

Discovered with Trinity (the syscall fuzzer).

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/proc.c