All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jate Sujjavanich <jsujjavanich-oI4RZb1+6EReLsYL91UIxL5dPsmED6B0@public.gmane.org>
To: 'Steven King' <sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>
Cc: "'spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'"
	<spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	'Greg Ungerer' <gerg-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org>
Subject: RE: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support
Date: Wed, 29 Sep 2010 09:44:32 -0400	[thread overview]
Message-ID: <6C2434209962DC46B88345CA85C334A2A434E65AF7@Courier.syntech.org> (raw)
In-Reply-To: <4CA17F2D.7000407-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org>

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

       reply	other threads:[~2010-09-29 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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             ` Jate Sujjavanich [this message]
     [not found]               ` <6C2434209962DC46B88345CA85C334A2A434E65AF7-sZuHJe4yGqVM6S7uvVHM8UB+6BGkLq7r@public.gmane.org>
2010-12-10 16:46                 ` [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support Steven King
     [not found]                   ` <201012100846.36080.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>
2010-12-30  6:20                     ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6C2434209962DC46B88345CA85C334A2A434E65AF7@Courier.syntech.org \
    --to=jsujjavanich-oi4rzb1+6erelsyl91uixl5dpsmed6b0@public.gmane.org \
    --cc=gerg-XXXsiaCtIV5Wk0Htik3J/w@public.gmane.org \
    --cc=sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.