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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHZ3=rpqq5ZJQUGR54vStbqohcrS_w2beVi4m1S+v=ZWEzVtKg@mail.gmail.com>
Date:   Wed, 1 Jul 2020 22:18:04 +0900
From:   Daisuke Yamane <yamane07ynct@...il.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: a3700: fix hang caused by a3700_spi_transfer_one_fifo()

2020年6月30日(火) 20:11 Mark Brown <broonie@...nel.org>:
>
> On Tue, Jun 30, 2020 at 02:44:21AM +0900, Daisuke Yamane wrote:
> > transfer_one() must call spi_finalize_current_transfer() before
> > returning to inform current transfer has finished. Otherwise spi driver
> > doesn't issue next transfer, and hang.
>
> To be clear it can also return a positive value and then finalize later,
> there's no need to finalize before returning (otherwise finalizing would
> be a bit redundant) and if the driver doesn't return a positive value
> there should be no need to finalize at all.
>
> > However a3700_spi_transfer_one_fifo() doesn't call it if waiting for
> > "wfifo empty" or "xfer ready" has timed out.
> > Thus, this patch corrects error handling of them.
>
> The core shouldn't be waiting at all if the driver returned an error, we
> only wait if the return value was positive.  Looking at the code it's
> not clear to me how we manage to end up waiting - it looks like the
> driver passes back the error correctly and the core looks like it does
> the right thing.  Have you seen hangs in operation?
Yes, and I could avoid hanging by this patch. But I also understand that
your point is correct. Probably I'm misunderstanding the cause of the hang.
I will investigate a little more.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ