| Submitter | Benjamin Thery |
|---|---|
| Date | Nov. 19, 2008, 8:41 p.m. |
| Message ID | <20081119204141.938837793@theryb.frec.bull.fr> |
| Download | mbox | patch |
| Permalink | /patch/9631/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
From: Benjamin Thery <benjamin.thery@bull.net> Date: Wed, 19 Nov 2008 21:41:38 +0100 > In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif > are opened with seq_open_private(), thus seq_release_private() should be > used to release them. > Should fix a small memory leak. > > Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Applied, thanks a lot Benjamin. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
Index: net-2.6/net/ipv6/ip6mr.c =================================================================== --- net-2.6.orig/net/ipv6/ip6mr.c +++ net-2.6/net/ipv6/ip6mr.c @@ -224,7 +224,7 @@ static struct file_operations ip6mr_vif_ .open = ip6mr_vif_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = seq_release_private, }; static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos) @@ -338,7 +338,7 @@ static struct file_operations ip6mr_mfc_ .open = ipmr_mfc_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = seq_release_private, }; #endif
In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif are opened with seq_open_private(), thus seq_release_private() should be used to release them. Should fix a small memory leak. Benjamin Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> --- net/ipv6/ip6mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)