public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Arne Redlich <arne.redlich@xiranet.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH] trivial scsi_execute_async fix
Date: Sat, 30 Sep 2006 15:49:40 +0200	[thread overview]
Message-ID: <20060930134940.GA21089@cheetah> (raw)

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);

                 reply	other threads:[~2006-09-30 13:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060930134940.GA21089@cheetah \
    --to=arne.redlich@xiranet.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    /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