Re: [PATCH update] firewire: deadline for PHY config transmission

From: Stefan Richter
Date: Thu Jun 26 2008 - 13:53:05 EST


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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/