[ 3.5.y.z extended stable ] Patch "can: gw: use kmem_cache_free() instead of kfree()" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Fri Apr 12 13:51:33 UTC 2013
This is a note to let you know that I have just added a patch titled
can: gw: use kmem_cache_free() instead of kfree()
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From f0c993bbdda9fb6550a76d980cf82845bb4707b7 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Date: Tue, 9 Apr 2013 14:16:04 +0800
Subject: [PATCH] can: gw: use kmem_cache_free() instead of kfree()
commit 3480a2125923e4b7a56d79efc76743089bf273fc upstream.
Memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Acked-by: Oliver Hartkopp <socketcan at hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
net/can/gw.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/can/gw.c b/net/can/gw.c
index b41acf2..423d226 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -436,7 +436,7 @@ static int cgw_notifier(struct notifier_block *nb,
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
hlist_del(&gwj->list);
cgw_unregister_filter(gwj);
- kfree(gwj);
+ kmem_cache_free(cgw_cache, gwj);
}
}
}
@@ -850,7 +850,7 @@ static void cgw_remove_all_jobs(void)
hlist_for_each_entry_safe(gwj, n, nx, &cgw_list, list) {
hlist_del(&gwj->list);
cgw_unregister_filter(gwj);
- kfree(gwj);
+ kmem_cache_free(cgw_cache, gwj);
}
}
@@ -903,7 +903,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
hlist_del(&gwj->list);
cgw_unregister_filter(gwj);
- kfree(gwj);
+ kmem_cache_free(cgw_cache, gwj);
err = 0;
break;
}
--
1.8.1.2
More information about the kernel-team
mailing list