public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH update] firewire: deadline for PHY config transmission
Date: Thu, 26 Jun 2008 19:52:31 +0200	[thread overview]
Message-ID: <4863D75F.3000804@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.9d09a78f5e399feb@s5r6.in-berlin.de>

Stefan Richter wrote:
> +	long timeout = DIV_ROUND_UP(HZ, 10);
...
> +	card->driver->send_request(card, &p->packet);
> +	timeout = wait_for_completion_timeout(&p->done, timeout);
> +	kref_put(&p->kref, phy_packet_release);
>  
> -	card->driver->send_request(card, &p.packet);
> -	wait_for_completion(&p.done);
> +	/* will leak p if the callback is never executed */
> +	WARN_ON(timeout == 0);
>  }

I can easily trigger the WARN_ON with something like "printf 'br 
short\nbr short\nbr short\n' | firecontrol" (repeatedly done) on an 
otherwise well behaving FW323.  I will eventually look into changing the 
phy packet submission once more into something which cannot leak memory.
-- 
Stefan Richter
-=====-==--- -==- ==-=-
http://arcgraph.de/sr/

      reply	other threads:[~2008-06-26 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 18:13 [RFT patch, regression fix] firewire: deadline for PHY config transmission Stefan Richter
2008-06-18  9:19 ` Stefan Richter
2008-06-18 16:20   ` [PATCH update] " Stefan Richter
2008-06-26 17:52     ` Stefan Richter [this message]

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=4863D75F.3000804@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