From: Kevin Winchester <kjwinchester@gmail.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: Ingo Molnar <mingo@elte.hu>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux@bohmer.net, jonathan@jonmasters.org,
matthias.kaehlcke@gmail.com
Subject: Possible locking issue in viotape.c
Date: Thu, 06 Dec 2007 21:29:58 -0400 [thread overview]
Message-ID: <4758A216.3030401@gmail.com> (raw)
In-Reply-To: <1196989515.1568.131.camel@jnielson-xp.ddns.mvista.com>
Daniel Walker wrote:
>
> I've posted all the ones I've done so far ..
>
> ftp://source.mvista.com/pub/dwalker/sem2mutex-2.6.24-rc4/
>
> Feel free to review or test them.. I've found it pretty easy to simply
> grep for certain class of semaphore usage, check if it's conforming to
> the mutex requirements, then convert it or not.. Checking them is
> getting to be a habit, so I don't think a list would help me.. However,
> someone else might be able to use it..
>
Thanks, that helps me not duplicate anything. One of the first ones I
was looking at (before your post) was viotape.c, which is in your patch
set. However, looking at the uses of the semaphore, I see that on line
409-410 the following code:
if (noblock)
return count;
which seems to ignore the fact that the semaphore has been downed (not
to mention the dma buffer and op struct allocations. I think it should be:
if (noblock)
ret = count;
goto free_dma;
instead. Do you want to make sure I'm right about that and fold it into
your patch? Or have you already submitted your patch (or should it be
in a separate patch? Alternatively, I can submit the patch if you don't
want to bother with it.
--
Kevin Winchester
next prev parent reply other threads:[~2007-12-07 1:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071206021857.826386004@mvista.com>
2007-12-05 8:00 ` [PATCH 1/3] stopmachine semaphore to mutex Daniel Walker
2007-12-05 8:00 ` [PATCH 2/3] Amiga serial driver: port_write_mutex fixup Daniel Walker
2007-12-05 8:00 ` [PATCH 3/3] printer port driver: semaphore to mutex Daniel Walker
2007-12-06 10:23 ` Ingo Molnar
2007-12-06 16:34 ` Daniel Walker
2007-12-06 20:01 ` Remy Bohmer
2007-12-06 20:12 ` Daniel Walker
2007-12-06 20:40 ` Remy Bohmer
2007-12-06 20:05 ` Matthias Kaehlcke
2007-12-06 20:12 ` Remy Bohmer
2007-12-06 20:23 ` Daniel Walker
2007-12-07 7:40 ` Matthias Kaehlcke
2007-12-06 20:44 ` Ingo Molnar
2007-12-06 23:30 ` Kevin Winchester
2007-12-07 1:05 ` Daniel Walker
2007-12-07 1:29 ` Kevin Winchester [this message]
2007-12-07 1:40 ` Possible locking issue in viotape.c Daniel Walker
2007-12-08 18:17 ` Kevin Winchester
2007-12-08 18:22 ` Daniel Walker
2007-12-08 19:19 ` Kevin Winchester
2007-12-08 19:45 ` Daniel Walker
2007-12-06 10:22 ` [PATCH 1/3] stopmachine semaphore to mutex Ingo Molnar
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=4758A216.3030401@gmail.com \
--to=kjwinchester@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dwalker@mvista.com \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@bohmer.net \
--cc=matthias.kaehlcke@gmail.com \
--cc=mingo@elte.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox