* [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* [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
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 12:58 [PATCH] spi: fix __spi_pump_messages deadlock Thomas Perrot
[not found] ` <1463144312-23998-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
2016-05-13 13:38 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2016-05-13 9:31 Thomas Perrot
[not found] ` <1463131892-5392-1-git-send-email-thomas.perrot-cVvwS2TCF4I@public.gmane.org>
2016-05-13 10:33 ` 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).