Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757166AbYCMUER (ORCPT ); Thu, 13 Mar 2008 16:04:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753462AbYCMUD6 (ORCPT ); Thu, 13 Mar 2008 16:03:58 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:40838 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752940AbYCMUD5 (ORCPT ); Thu, 13 Mar 2008 16:03:57 -0400 Date: Thu, 13 Mar 2008 13:01:12 -0700 From: Andrew Morton To: Boaz Harrosh Cc: James.Bottomley@HansenPartnership.com, stern@rowland.harvard.edu, mdharm-usb@one-eyed-alien.net, svens@stackframe.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, fujita.tomonori@lab.ntt.co.jp Subject: Re: [PATCH ver3] isd200: Allocate sense_buffer for hacked up scsi_cmnd Message-Id: <20080313130112.22c0776f.akpm@linux-foundation.org> In-Reply-To: <47D810C9.90309@panasas.com> References: <47D7F5A3.9010004@panasas.com> <1205340884.2941.112.camel@localhost.localdomain> <47D80D60.3060006@panasas.com> <47D810C9.90309@panasas.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 45 On Wed, 12 Mar 2008 19:20:09 +0200 Boaz Harrosh wrote: > > Since the separation of sense_buffer from scsi_cmnd, Drivers that hack their > own struct scsi_cmnd like here isd200, must also take care of their own > sense_buffer. > > Signed-off-by: Boaz Harrosh > --- > drivers/usb/storage/isd200.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c > index 4f2d143..971d13d 100644 > --- a/drivers/usb/storage/isd200.c > +++ b/drivers/usb/storage/isd200.c > @@ -1470,6 +1470,7 @@ static void isd200_free_info_ptrs(void *info_) > if (info) { > kfree(info->id); > kfree(info->RegsBuf); > + kfree(info->srb.sense_buffer); > } > } > > @@ -1495,7 +1496,9 @@ static int isd200_init_info(struct us_data *us) > kzalloc(sizeof(struct hd_driveid), GFP_KERNEL); > info->RegsBuf = (unsigned char *) > kmalloc(sizeof(info->ATARegs), GFP_KERNEL); > - if (!info->id || !info->RegsBuf) { > + info->srb.sense_buffer = > + kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); > + if (!info->id || !info->RegsBuf || !info->srb.sense_buffer) { > isd200_free_info_ptrs(info); > kfree(info); > retStatus = ISD200_ERROR; I've thoroughly lost the plot here. Is this needed in 2.6.25? If so, why? Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/