Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2012 08:19:05 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-fs@freebsd.org
Cc:        "Desai, Kashyap" <Kashyap.Desai@lsi.com>, "Kenneth D. Merry" <ken@freebsd.org>, "Reddy, Sreekanth" <Sreekanth.Reddy@lsi.com>, "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>, "McConnell, Stephen" <Stephen.McConnell@lsi.com>
Subject:   Re: Kernel panic in FreeBSD-8.3 from UFS
Message-ID:  <201206060819.05864.jhb@freebsd.org>
In-Reply-To: <B2FD678A64EAAD45B089B123FDFC3ED72B9F6C21A7@inbmail01.lsi.com>
References:  <B2FD678A64EAAD45B089B123FDFC3ED72B9F6C1F79@inbmail01.lsi.com> <20120601125824.GV2358@deviant.kiev.zoral.com.ua> <B2FD678A64EAAD45B089B123FDFC3ED72B9F6C21A7@inbmail01.lsi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, June 05, 2012 8:19:05 am Desai, Kashyap wrote:
> Hi All,
> 
> We found some potential area of memory leak in CAM layer. 
> CAM XPT Memory leak is due to following  function in scsi/scsi_all.c
> 
> int
> scsi_command_string(struct ccb_scsiio *csio, struct sbuf *sb)                                
> 
> 
> In above function, CAM layer allocate memory for ccb  device as below
>   if ((cgd = (struct ccb_getdev*)xpt_alloc_ccb_nowait()) == NULL)
> 
> 
> _But_, unfortunately we never free the allocated memory and we see memory 
leak of 2K every time when someone is calling 
> Scsi_command_string from kernel mode.
> 
> 
> Attached is a proposed patch for this issue.

The patch looks correct to me.  Can one of the CAM folks (Ken?) review it and 
commit it?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206060819.05864.jhb>