[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/17] pfinet: Fix call to kfree_s
From: |
Justus Winter |
Subject: |
[PATCH 02/17] pfinet: Fix call to kfree_s |
Date: |
Fri, 19 Jul 2013 17:25:04 +0200 |
kfree_s expects a pointer and a size argument. Currently the
sizeof(cache) is used as size argument, this is certainly not what was
intented.
For reference, this code was present in Linux up to version 2.3.14 and
was replaced in 2.3.15.
Found using coccinelle and
https://raw.github.com/coccinelle/coccinellery/master/sz/sz.cocci.
* pfinet/linux-src/net/ipv4/ipmr.c (ipmr_cache_delete): Fix kfree_s call.
---
pfinet/linux-src/net/ipv4/ipmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pfinet/linux-src/net/ipv4/ipmr.c b/pfinet/linux-src/net/ipv4/ipmr.c
index cd51cd9..904ad29 100644
--- a/pfinet/linux-src/net/ipv4/ipmr.c
+++ b/pfinet/linux-src/net/ipv4/ipmr.c
@@ -332,7 +332,7 @@ static void ipmr_cache_delete(struct mfc_cache *cache)
kfree_skb(skb);
}
}
- kfree_s(cache,sizeof(cache));
+ kfree_s(cache,sizeof(struct mfc_cache));
}
/*
--
1.7.10.4
- Re: [PATCH 10/17] hurd: add fsys_get_children, (continued)
- Re: [PATCH 10/17] hurd: add fsys_get_children, Neal H. Walfield, 2013/07/15
- Re: [PATCH 10/17] hurd: add fsys_get_children, Samuel Thibault, 2013/07/15
- Re: [PATCH 10/17] hurd: add fsys_get_children, Neal H. Walfield, 2013/07/12
- Re: [PATCH 10/17] hurd: add fsys_get_children, Samuel Thibault, 2013/07/15
- Re: [PATCH 10/17] hurd: add fsys_get_children, Justus Winter, 2013/07/18
- Re: [PATCH 10/17] hurd: add fsys_get_children, Samuel Thibault, 2013/07/18
- Re: [PATCH 10/17] hurd: add fsys_get_children, Neal H. Walfield, 2013/07/18
- Re: [PATCH 10/17] hurd: add fsys_get_children, Richard Braun, 2013/07/18
- feature-mtab-translator (v3), Justus Winter, 2013/07/19
- [PATCH 01/17] libnetfs: implement file_get_translator_cntl, Justus Winter, 2013/07/19
- [PATCH 02/17] pfinet: Fix call to kfree_s,
Justus Winter <=
- Re: [PATCH 02/17] pfinet: Fix call to kfree_s, Samuel Thibault, 2013/07/20
- [PATCH 03/17] libdiskfs: track file name in struct peropen, Justus Winter, 2013/07/19
- Re: [PATCH 03/17] libdiskfs: track file name in struct peropen, Neal H. Walfield, 2013/07/22
- [PATCH 04/17] libnetfs: track file name in struct peropen, Justus Winter, 2013/07/19
- [PATCH 06/17] libdiskfs: add fsys_get_children, Justus Winter, 2013/07/19
- [PATCH 05/17] libfshelp: add translator-list.c, Justus Winter, 2013/07/19
- [PATCH 08/17] libtrivfs: add fsys_get_children, Justus Winter, 2013/07/19
- [PATCH 07/17] libnetfs: add fsys_get_children, Justus Winter, 2013/07/19
- Re: [PATCH 07/17] libnetfs: add fsys_get_children, Samuel Thibault, 2013/07/22
- Re: [PATCH 07/17] libnetfs: add fsys_get_children, Pierre Thierry, 2013/07/25