* [PATCH] spi: fix __spi_pump_messages deadlock
@ 2016-05-13 9:31 Thomas Perrot
[not found] ` <1463131892-5392-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Perrot @ 2016-05-13 9:31 UTC (permalink / raw)
To: linux-spi-u79uwXL29TY76Z2rM5mHXA
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, Thomas Perrot
Signed-off-by: Thomas Perrot <thomas.perrot-cVvwS2TCF4I@public.gmane.org>
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 0239b45..785080a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1192,7 +1192,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread,
}
out:
- if (!bus_locked)
+ if (bus_locked)
mutex_unlock(&master->bus_lock_mutex);
/* Prod the scheduler in case transfer_one() was busy waiting */
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: fix __spi_pump_messages deadlock
[not found] ` <1463131892-5392-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
@ 2016-05-13 10:33 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-05-13 10:33 UTC (permalink / raw)
To: Thomas Perrot; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
On Fri, May 13, 2016 at 11:31:32AM +0200, Thomas Perrot wrote:
> Signed-off-by: Thomas Perrot <thomas.perrot-cVvwS2TCF4I@public.gmane.org>
This really isn't adequate, you need to provide a changelog. Simply
saying that there is a deadlock is not enough, you need to say what the
deadlock is and why your change fixes it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] spi: fix __spi_pump_messages deadlock
@ 2016-05-13 12:58 Thomas Perrot
[not found] ` <1463144312-23998-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Perrot @ 2016-05-13 12:58 UTC (permalink / raw)
To: linux-spi-u79uwXL29TY76Z2rM5mHXA
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, Thomas Perrot
The lock on the spi bus is never release at the end of call of the function
__spi_pump_messages.
Signed-off-by: Thomas Perrot <thomas.perrot-cVvwS2TCF4I@public.gmane.org>
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 0239b45..785080a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1192,7 +1192,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread,
}
out:
- if (!bus_locked)
+ if (bus_locked)
mutex_unlock(&master->bus_lock_mutex);
/* Prod the scheduler in case transfer_one() was busy waiting */
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: fix __spi_pump_messages deadlock
[not found] ` <1463144312-23998-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
@ 2016-05-13 13:38 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-05-13 13:38 UTC (permalink / raw)
To: Thomas Perrot; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
On Fri, May 13, 2016 at 02:58:32PM +0200, Thomas Perrot wrote:
> The lock on the spi bus is never release at the end of call of the function
> __spi_pump_messages.
So how does this deadlock, in what situations does this trigger? If
there were a deadlock that happened every single time we tried to
transfer messages I'd expect people would have noticed...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-13 13:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 9:31 [PATCH] spi: fix __spi_pump_messages deadlock Thomas Perrot
[not found] ` <1463131892-5392-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
2016-05-13 10:33 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 12:58 Thomas Perrot
[not found] ` <1463144312-23998-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
2016-05-13 13:38 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).