Re: [PATCH 3 of 6] scsi: Support devices with protection information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/17/08 1:28 AM, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> wrote:

> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
> --- a/drivers/scsi/scsi.c
> +++ b/drivers/scsi/scsi.c
> @@ -199,24 +199,60 @@ scsi_pool_free_command(struct scsi_host_
>  {
> kmem_cache_free(pool->sense_slab, cmd->sense_buffer);
> kmem_cache_free(pool->cmd_slab, cmd);
> +
> + if (cmd->prot_sdb)
> +  kmem_cache_free(scsi_sdb_cache, cmd->prot_sdb);
> +}
> +

Shouldn't this check (and potential kmem_cache_free call) get done before
freeing the cmd to the cmd_slab?

Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux