lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALMYJDtpdFcVs_b-ePBnVHi-xkPc0NUST1_9WhpHsjoLaVnpUQ@mail.gmail.com>
Date:	Sun, 5 Feb 2012 14:47:46 +0530
From:	Santosh Y <santoshsy@...il.com>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	Vinayak Holikatti <vinholikatti@...il.com>,
	James.Bottomley@...senpartnership.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, patches@...aro.org,
	linux-samsung-soc@...r.kernel.org, saugata.das@...aro.org,
	arnd@...db.de, venkat@...aro.org, girish.shivananjappa@...aro.org,
	vishak.g@...sung.com, k.rajesh@...sung.com, yejin.moon@...sung.com
Subject: Re: [PATCH 4/4] [SCSI] ufshcd: SCSI error handling

On Sun, Feb 5, 2012 at 1:07 PM, Namjae Jeon <linkinjeon@...il.com> wrote:
>> +
>> +/**
>> + * ufshcd_abort - abort a specific command
>> + * @cmd: SCSI command pointer
>> + *
>> + * Returns 0 on success, non-zero value on failure
>> + */
>> +static int ufshcd_abort(struct scsi_cmnd *cmd)
>> +{
>> +       struct Scsi_Host *host;
>> +       struct ufs_hba *hba;
>> +       unsigned long flags;
>> +       unsigned int tag;
>> +       unsigned int pos;
>> +       int err;
>> +
>> +       host = cmd->device->host;
>> +       hba = (struct ufs_hba *) host->hostdata;
>> +       tag = cmd->request->tag;
>> +
>> +       spin_lock_irqsave(host->host_lock, flags);
>> +       pos = (1 << tag);
>> +
>> +       /* check if command is still pending */
>> +       if (!(hba->outstanding_reqs & pos)) {
>> +               err = -1;
>> +               spin_unlock_irqrestore(host->host_lock, flags);
>> +               goto out;
>> +       }
>> +
>> +       err = ufshcd_issue_tm_cmd(hba, &hba->lrb[tag], UFS_ABORT_TASK);
> Hi.
> You called spin_lock_irqsave in ufshcd_issue_tm_cmd() without
> spin_unlock_irqrestore.

Thanks for reviewing the code. We'll correct it.
Please let us know your comments on the other patches too.

>
>> +       if (!err) {
>> +               spin_lock_irqsave(host->host_lock, flags);
> This case is same also.
> Thanks.
>> +               scsi_dma_unmap(cmd);
>> +
>> +               /* clear the respective UTRLCLR bit */
>> +               writel(~pos,
>> +                       (UFSHCD_MMIO_BASE +
>> +                        REG_UTP_TRANSFER_REQ_LIST_CLEAR));
>> +               hba->outstanding_reqs &= ~pos;
>> +               hba->lrb[tag].cmd = NULL;
>> +               spin_unlock_irqrestore(host->host_lock, flags);
>> +       }
>> +out:
>> +       return err;
>> +}
>> +

-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ