lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 18 Jun 2008 11:19:00 +0200 From: Stefan Richter <stefanr@...6.in-berlin.de> To: linux1394-devel@...ts.sourceforge.net CC: linux-kernel@...r.kernel.org Subject: Re: [RFT patch, regression fix] firewire: deadline for PHY config transmission Stefan Richter wrote: > I briefly tested the patch with 7 different working controllers and the > packet callback seems to complete() always before the arbitrarily > chosen timeout of 10ms plus rounding. ... > void fw_send_phy_config(struct fw_card *card, > int node_id, int generation, int gap_count) > { > - struct fw_phy_packet p; > + struct fw_phy_packet *p; > + long timeout = DIV_ROUND_UP(HZ, 100); > u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG) | ... > + 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); > } The warning triggered on a VT6307 after cold boot. I will retry later today with HZ/10. -- 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@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists