Skip to content

Commit 7b9a035

Browse files
committed
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>
2 parents ca10b9e + 3480a21 commit 7b9a035

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

net/can/gw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static int cgw_notifier(struct notifier_block *nb,
466466
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
467467
hlist_del(&gwj->list);
468468
cgw_unregister_filter(gwj);
469-
kfree(gwj);
469+
kmem_cache_free(cgw_cache, gwj);
470470
}
471471
}
472472
}
@@ -864,7 +864,7 @@ static void cgw_remove_all_jobs(void)
864864
hlist_for_each_entry_safe(gwj, nx, &cgw_list, list) {
865865
hlist_del(&gwj->list);
866866
cgw_unregister_filter(gwj);
867-
kfree(gwj);
867+
kmem_cache_free(cgw_cache, gwj);
868868
}
869869
}
870870

@@ -920,7 +920,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
920920

921921
hlist_del(&gwj->list);
922922
cgw_unregister_filter(gwj);
923-
kfree(gwj);
923+
kmem_cache_free(cgw_cache, gwj);
924924
err = 0;
925925
break;
926926
}

0 commit comments

Comments
 (0)