linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [ 28/29] can: gw: use kmem_cache_free() instead of kfree()
Date: Wed, 10 Apr 2013 15:49:46 -0700	[thread overview]
Message-ID: <20130410224806.989031370@linuxfoundation.org> (raw)
In-Reply-To: <20130410224804.061806042@linuxfoundation.org>

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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@trendmicro.com.cn>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/can/gw.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -436,7 +436,7 @@ static int cgw_notifier(struct notifier_
 			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
 
 		hlist_del(&gwj->list);
 		cgw_unregister_filter(gwj);
-		kfree(gwj);
+		kmem_cache_free(cgw_cache, gwj);
 		err = 0;
 		break;
 	}



  parent reply	other threads:[~2013-04-10 22:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 22:49 [ 00/29] 3.4.40-stable review Greg Kroah-Hartman
2013-04-10 22:49 ` [ 01/29] ASoC: dma-sh7760: Fix compile error Greg Kroah-Hartman
2013-04-10 22:49 ` [ 02/29] regmap: cache Fix regcache-rbtree sync Greg Kroah-Hartman
2013-04-10 22:49 ` [ 03/29] spi/s3c64xx: modified error interrupt handling and init Greg Kroah-Hartman
2013-04-10 22:49 ` [ 04/29] spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts Greg Kroah-Hartman
2013-04-10 22:49 ` [ 05/29] UBIFS: make space fixup work in the remount case Greg Kroah-Hartman
2013-04-10 22:49 ` [ 06/29] reiserfs: Fix warning and inode leak when deleting inode with xattrs Greg Kroah-Hartman
2013-04-10 22:49 ` [ 07/29] ALSA: hda - bug fix on return value when getting HDMI ELD info Greg Kroah-Hartman
2013-04-10 22:49 ` [ 08/29] ALSA: hda - Enabling Realtek ALC 671 codec Greg Kroah-Hartman
2013-04-10 22:49 ` [ 09/29] ALSA: hda - fix typo in proc output Greg Kroah-Hartman
2013-04-10 22:49 ` [ 10/29] EISA/PCI: Init EISA early, before PNP Greg Kroah-Hartman
2013-04-10 22:49 ` [ 11/29] EISA/PCI: Fix bus res reference Greg Kroah-Hartman
2013-04-10 22:49 ` [ 12/29] libata: Use integer return value for atapi_command_packet_set Greg Kroah-Hartman
2013-04-10 22:49 ` [ 13/29] libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive Greg Kroah-Hartman
2013-04-10 22:49 ` [ 14/29] alpha: Add irongate_io to PCI bus resources Greg Kroah-Hartman
2013-04-10 22:49 ` [ 15/29] ata_piix: Fix DVD not dectected at some Haswell platforms Greg Kroah-Hartman
2013-04-10 22:49 ` [ 16/29] ftrace: Consistently restore trace function on sysctl enabling Greg Kroah-Hartman
2013-04-10 22:49 ` [ 17/29] powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test Greg Kroah-Hartman
2013-04-10 22:49 ` [ 18/29] x86: remove the x32 syscall bitmask from syscall_get_nr() Greg Kroah-Hartman
2013-04-10 22:49 ` [ 19/29] hwspinlock: fix __hwspin_lock_request error path Greg Kroah-Hartman
2013-04-10 22:49 ` [ 20/29] spinlocks and preemption points need to be at least compiler barriers Greg Kroah-Hartman
2013-04-10 22:49 ` [ 21/29] crypto: gcm - fix assumption that assoc has one segment Greg Kroah-Hartman
2013-04-10 22:49 ` [ 22/29] block: avoid using uninitialized value in from queue_var_store Greg Kroah-Hartman
2013-04-10 22:49 ` [ 23/29] x86: Fix rebuild with EFI_STUB enabled Greg Kroah-Hartman
2013-04-10 22:49 ` [ 24/29] thermal: return an error on failure to register thermal class Greg Kroah-Hartman
2013-04-10 22:49 ` [ 25/29] panic: fix a possible deadlock in panic() Greg Kroah-Hartman
2013-04-10 22:49 ` [ 26/29] mm: prevent mmap_cache race in find_vma() Greg Kroah-Hartman
2013-04-10 22:49 ` [ 27/29] Revert "mwifiex: cancel cmd timer and free curr_cmd in shutdown process Greg Kroah-Hartman
2013-04-10 22:49 ` Greg Kroah-Hartman [this message]
2013-04-10 22:49 ` [ 29/29] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once Greg Kroah-Hartman
2013-04-11 16:29 ` [ 00/29] 3.4.40-stable review Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130410224806.989031370@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --cc=stable@vger.kernel.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).