From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 1/4] firewire: fix race of bus reset with request transmission
Date: Sat, 12 Jul 2008 14:59:44 +0200 (CEST) [thread overview]
Message-ID: <tkrat.c946d53f67bae7d5@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.58323b2455660591@s5r6.in-berlin.de>
I wrote:
> Contexts which access an instance of struct fw_transaction are:
> 1. the submitter, until it inserted the packet which is embedded in the
> transaction into the AT req DMA,
> 2. the AsReqTrContext tasklet when the request packet was acked by the
> responder node or transmission to the responder failed,
> 3. the AsRspRcvContext tasklet when it found a request which matched
> an incoming response,
> 4. the card->flush_timer when it picks up timed-out transactions to
> cancel them,
> 5. the bus reset tasklet when it cancels transactions (this access is
> eliminated by this patch),
> 6. a process which shuts down an fw_card (unregisters it from fw-core
> when the controller is unbound from fw-ohci) --- although in this
> case there shouldn't really be any transactions anymore because we
> wait until all card users finished their business with the card.
>
> All of these contexts run concurrently (except for the 6th, presumably).
PS: Actually the three tasklets (2nd, 3rd, 5th context) are all
scheduled on the same CPU, hence are serialized. Therefore
> The 5th looks safe against 2nd, 3rd [...] but is unsafe against 1st.
5th is serialized against 4th and 6th by lock protection of
card->transaction_list accesses.
--
Stefan Richter
-=====-==--- -=== -==--
http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-07-12 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 12:48 [patch 0/4] firewire: keeping accesses to fw_transaction in check Stefan Richter
2008-07-12 12:49 ` [patch 1/4] firewire: fix race of bus reset with request transmission Stefan Richter
2008-07-12 12:59 ` Stefan Richter [this message]
2008-07-12 12:50 ` [patch 2/4] firewire: fully initialize fw_transaction before marking it pending Stefan Richter
2008-07-12 12:50 ` [patch 3/4] firewire: small fw_fill_request cleanup Stefan Richter
2008-07-12 12:51 ` [patch 4/4] firewire: warn on unfinished transactions during card removal Stefan Richter
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=tkrat.c946d53f67bae7d5@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®