Re: [PATCH] scsi_device refcounting and list lockdown

Christoph Hellwig
2003-10-28T09:06:25Z

On Mon, Oct 27, 2003 at 04:01:01PM -0800, Randy.Dunlap wrote:
> Hi,
>
> Even before this patch (which isn't merged AFAIK), are
> scsi_device_get() and scsi_device_put() intended to be used
> by SCSI LLDD's for scsi_device reference counts?

Yes, if they need to. But usually they should not have to worry.

> I'm trying to determine what needs to be done to fix aha152x.c,
> where it creates a struct scsi_cmnd and then inits as follows,
> with my example patch:

A driver is not allowed to "create" a scsi_cmnd. It must use
scsi_get_command to allocate one.