All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trivial scsi_execute_async fix
@ 2006-09-30 13:49 Arne Redlich
  0 siblings, 0 replies; only message in thread
From: Arne Redlich @ 2006-09-30 13:49 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

In scsi_execute_async()'s error path, a struct scsi_io_context
allocated with kmem_cache_alloc() is kfree()'d. Obviously
kmem_cache_free() should be used instead.

Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>

diff -prauN a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c	2006-09-20 13:59:29.389895000 +0200
+++ b/drivers/scsi/scsi_lib.c	2006-09-30 15:11:36.458871925 +0200
@@ -424,7 +424,7 @@ int scsi_execute_async(struct scsi_devic
 free_req:
 	blk_put_request(req);
 free_sense:
-	kfree(sioc);
+	kmem_cache_free(scsi_io_context_cache, sioc);
 	return DRIVER_ERROR << 24;
 }
 EXPORT_SYMBOL_GPL(scsi_execute_async);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-30 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-30 13:49 [PATCH] trivial scsi_execute_async fix Arne Redlich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.