summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-09 13:24:35 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-09 13:24:35 -0400
commit7b9a035f0ce08e7a77831075e8ac6bf971d0f637 (patch)
treeefa23041f8511d55c4fab7a6fa7c4a849da85114
parentca10b9e9a8ca7342ee07065289cbe74ac128c169 (diff)
parent3480a2125923e4b7a56d79efc76743089bf273fc (diff)
downloadlinux-3.10-7b9a035f0ce08e7a77831075e8ac6bf971d0f637.tar.gz
linux-3.10-7b9a035f0ce08e7a77831075e8ac6bf971d0f637.tar.bz2
linux-3.10-7b9a035f0ce08e7a77831075e8ac6bf971d0f637.zip
Merge branch 'fixes-for-3.9' of git://gitorious.org/linux-can/linux-can
Marc Kleine-Budde says: ==================== here's a fix for the v3.9 release cycle, if not too late: Wei Yongjun contributes a patch for the can-gw protocoll. The patch fixes the memory allocated with kmem_cache_alloc(), is now freed using kmem_cache_free(), not kfree(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/can/gw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/can/gw.c b/net/can/gw.c
index 2d117dc5ebe..117814a7e73 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -466,7 +466,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);
}
}
}
@@ -864,7 +864,7 @@ static void cgw_remove_all_jobs(void)
hlist_for_each_entry_safe(gwj, nx, &cgw_list, list) {
hlist_del(&gwj->list);
cgw_unregister_filter(gwj);
- kfree(gwj);
+ kmem_cache_free(cgw_cache, gwj);
}
}
@@ -920,7 +920,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;
}