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] [day] [month] [year] [list]
Date:	Mon, 14 Jun 2010 21:53:13 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Linus WALLEIJ <linus.walleij@...ricsson.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jonas ABERG <jonas.aberg@...ricsson.com>
Subject: Re: [PATCH 08/18] DMAENGINE: ste_dma40: lock fix

On Mon, Jun 14, 2010 at 9:41 AM, Linus WALLEIJ
<linus.walleij@...ricsson.com> wrote:
> On 06/12/2010 12:38 AM, Dan Williams wrote:
>
>> On Tue, Jun 1, 2010 at 5:21 AM, Linus Walleij
>> <linus.walleij@...ricsson.com> wrote:
>>> From: Jonas Aaberg <jonas.aberg@...ricsson.com>
>>>
>>> Fix up some locking issues found by enabling lock debugging.
>>>
>>> Signed-off-by: Jonas Aaberg <jonas.aberg@...ricsson.com>
>>> Signed-off-by: Linus Walleij <linus.walleij@...ricsson.com>
>>> ---
>>>  drivers/dma/ste_dma40.c |   14 +++++++-------
>>>  1 files changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index
>>> aba86bb..c4b0d37 100644
>>> --- a/drivers/dma/ste_dma40.c
>>> +++ b/drivers/dma/ste_dma40.c
>> [..]
>>>  static int d40_channel_execute_command(struct d40_chan *d40c, @@
>>> -1990,8 +1992,6 @@ static struct dma_async_tx_descriptor *d40_prep_slave_sg(struct dma_chan *chan,
>>>        if (d40d == NULL)
>>>                return NULL;
>>>
>>> -       memset(d40d, 0, sizeof(struct d40_desc));
>>> -
>>
>> This one isn't a locking bug fix.
>
> Well, actually it was overwriting a spinlock, so I would considering
> a locking bug area atleast.

Ah, I missed that you call dma_async_tx_descriptor_init() every prep.
It may be worthwhile to select ASYNC_TX_DISABLE_CHANNEL_SWITCH to get
rid of the unused fields for async_tx channel switching *.

> But if you prefer we split this one-liner into a separate patch.

You never take the embedded lock so there was not a problem, but you
can leave it in as an innocuous cleanup.

Thanks,
Dan

* I'm now thinking that channel switching should be an opt-in request
rather than opt-out, because I can foresee a driver relying on the
size reductions it affords.  With the logic flipped we can disable the
driver that has this dependence.
--
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