* RE: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support [not found] ` <4CA17F2D.7000407-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org> @ 2010-09-29 13:44 ` Jate Sujjavanich [not found] ` <6C2434209962DC46B88345CA85C334A2A434E65AF7-sZuHJe4yGqVM6S7uvVHM8UB+6BGkLq7r@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jate Sujjavanich @ 2010-09-29 13:44 UTC (permalink / raw) To: 'Steven King' Cc: 'spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org', 'Greg Ungerer' Here's a patch for your review. After grabbing a msg from the msgq, the mcfqspi_work function calls list_del_init on the mcfqspi->msgq which unintentionally deletes the rest of the list before it can be processed. If qspi call was made using spi_sync, this can result in a process hang. Signed-off by Jate Sujjavanich<jsujjavanich-oI4RZb1+6EReLsYL91UIxL5dPsmED6B0@public.gmane.org> ----------- diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c index 59be3ef..0aa00af 100644 --- a/drivers/spi/coldfire_qspi.c +++ b/drivers/spi/coldfire_qspi.c @@ -316,7 +316,7 @@ static void mcfqspi_work(struct work_struct *work) msg = container_of(mcfqspi->msgq.next, struct spi_message, queue); - list_del_init(&mcfqspi->msgq); + list_del_init(&msg->queue); spin_unlock_irqrestore(&mcfqspi->lock, flags); spi = msg->spi; -----Original Message----- From: Greg Ungerer [mailto:gerg-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org] Sent: Tuesday, September 28, 2010 1:38 AM To: Jate Sujjavanich Cc: 'Steven King'; uclinux-dev-JBU5SbJe1FlAfugRpC6u6w@public.gmane.org Subject: Re: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support Hi Jate, On 25/09/10 00:00, Jate Sujjavanich wrote: > I tried out the&msg->queue, and it's running fine. It's better than my fix because it's more clear than "mcfqspi->msgq.next". > > > <SNIP> Seeing as this is spi related you should send this to the spi list as well (or at least to Grant Likley as well). Regards Greg ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <6C2434209962DC46B88345CA85C334A2A434E65AF7-sZuHJe4yGqVM6S7uvVHM8UB+6BGkLq7r@public.gmane.org>]
* Re: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support [not found] ` <6C2434209962DC46B88345CA85C334A2A434E65AF7-sZuHJe4yGqVM6S7uvVHM8UB+6BGkLq7r@public.gmane.org> @ 2010-12-10 16:46 ` Steven King [not found] ` <201012100846.36080.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Steven King @ 2010-12-10 16:46 UTC (permalink / raw) To: Jate Sujjavanich Cc: 'spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org', 'Greg Ungerer' On Wednesday 29 September 2010 06:44:32 Jate Sujjavanich wrote: > Here's a patch for your review. > > > After grabbing a msg from the msgq, the mcfqspi_work function calls > list_del_init on the mcfqspi->msgq which unintentionally deletes the rest > of the list before it can be processed. If qspi call was made using > spi_sync, this can result in a process hang. > > Signed-off by Jate Sujjavanich<jsujjavanich-oI4RZb1+6EReLsYL91UIxL5dPsmED6B0@public.gmane.org> > ----------- > diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c > index 59be3ef..0aa00af 100644 > --- a/drivers/spi/coldfire_qspi.c > +++ b/drivers/spi/coldfire_qspi.c > @@ -316,7 +316,7 @@ static void mcfqspi_work(struct work_struct *work) > msg = container_of(mcfqspi->msgq.next, struct spi_message, > queue); > - list_del_init(&mcfqspi->msgq); > + list_del_init(&msg->queue); > spin_unlock_irqrestore(&mcfqspi->lock, flags); > spi = msg->spi; > A belated ack. Grant, can we still get this into .37? ------------------------------------------------------------------------------ Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <201012100846.36080.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>]
* Re: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support [not found] ` <201012100846.36080.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org> @ 2010-12-30 6:20 ` Grant Likely 0 siblings, 0 replies; 3+ messages in thread From: Grant Likely @ 2010-12-30 6:20 UTC (permalink / raw) To: Steven King Cc: Jate Sujjavanich, 'Greg Ungerer', 'spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org' On Fri, Dec 10, 2010 at 08:46:35AM -0800, Steven King wrote: > On Wednesday 29 September 2010 06:44:32 Jate Sujjavanich wrote: > > Here's a patch for your review. > > > > > > After grabbing a msg from the msgq, the mcfqspi_work function calls > > list_del_init on the mcfqspi->msgq which unintentionally deletes the rest > > of the list before it can be processed. If qspi call was made using > > spi_sync, this can result in a process hang. > > > > Signed-off by Jate Sujjavanich<jsujjavanich-oI4RZb1+6EReLsYL91UIxL5dPsmED6B0@public.gmane.org> > > ----------- > > diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c > > index 59be3ef..0aa00af 100644 > > --- a/drivers/spi/coldfire_qspi.c > > +++ b/drivers/spi/coldfire_qspi.c > > @@ -316,7 +316,7 @@ static void mcfqspi_work(struct work_struct *work) > > msg = container_of(mcfqspi->msgq.next, struct spi_message, > > queue); > > - list_del_init(&mcfqspi->msgq); > > + list_del_init(&msg->queue); > > spin_unlock_irqrestore(&mcfqspi->lock, flags); > > spi = msg->spi; > > > > > A belated ack. > > Grant, can we still get this into .37? Applied manually (patch was mailer-damaged). I'll see if Linux will still pick it up for .37. thanks. g. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-30 6:20 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <201001221243.04045.sfking@fdwdc.com> [not found] ` <4C4FA5AA.3020804@snapgear.com> [not found] ` <6C2434209962DC46B88345CA85C334A2A434E65ADC@Courier.syntech.org> [not found] ` <201009230842.40958.sfking@fdwdc.com> [not found] ` <6C2434209962DC46B88345CA85C334A2A434E65AEA@Courier.syntech.org> [not found] ` <4CA17F2D.7000407@snapgear.com> [not found] ` <4CA17F2D.7000407-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org> 2010-09-29 13:44 ` [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support Jate Sujjavanich [not found] ` <6C2434209962DC46B88345CA85C334A2A434E65AF7-sZuHJe4yGqVM6S7uvVHM8UB+6BGkLq7r@public.gmane.org> 2010-12-10 16:46 ` Steven King [not found] ` <201012100846.36080.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org> 2010-12-30 6:20 ` Grant Likely
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).