Kernel panic in FreeBSD-8.3 from UFS
Kenneth D. Merry
ken at FreeBSD.org
Wed Jun 6 17:06:42 UTC 2012
On Tue, Jun 05, 2012 at 17:49:05 +0530, 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 good, I just committed it.
Thanks!
Ken
--
Kenneth Merry
ken at FreeBSD.ORG
More information about the freebsd-scsi
mailing list