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: <yw1xwpsa8j2x.fsf@unicorn.mansr.com>
Date:	Sat, 19 Dec 2015 17:05:42 +0000
From:	Måns Rullgård <mans@...sr.com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	Julian Margetson <runaway@...dw.ms>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Tejun Heo <tj@...nel.org>, linux-ide@...r.kernel.org,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

Andy Shevchenko <andy.shevchenko@...il.com> writes:

> On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@...sr.com> wrote:
>
>> OK, I've found something.  The dma setup errors are benign, caused by
>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>> operations.
>
> I suppose the following is a quick fix to avoid preparing descriptor
> for non-DMA operations (not tested anyhow)
>
> a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
> @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
> ata_queued_cmd *qc, u8 tag)
>                 __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
>                  qc->n_elem);
>
> +       if (!is_slave_direction(qc->dma_dir))
> +               return;
> +
>         desc = dma_dwc_xfer_setup(qc);
>         if (!desc) {
>                 dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",

I already have a better patch sitting here.

>> The real error is the lock recursion that's reported
>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>> With lock debugging enabled, I get the same error.  This patch should
>> fix it.
>
>> -       spin_lock_irqsave(&ap->host->lock, flags);
>>         hsdevp->cmd_issued[tag] = cmd_issued;
>> -       spin_unlock_irqrestore(&ap->host->lock, flags);
>
>> +
>
> This will create a second empty line, though I don't care it is so minor.

The patch leaves one blank line before the following block comment.  I
think it looks better that way.

-- 
Måns Rullgård
--
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