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
| ||
|
Message-Id: <201005281726.00855.oneukum@suse.de> Date: Fri, 28 May 2010 17:26:00 +0200 From: Oliver Neukum <oneukum@...e.de> To: Matthias Fuchs <matthias.fuchs@....eu> Cc: netdev@...r.kernel.org, Socketcan-core@...ts.berlios.de, linux-usb@...r.kernel.org Subject: Re: [PATCH v3] can: Add driver for esd CAN-USB/2 device Am Freitag, 28. Mai 2010 16:19:33 schrieb Matthias Fuchs: > On Wednesday 26 May 2010 15:47, Oliver Neukum wrote: > > Am Mittwoch, 26. Mai 2010 11:14:03 schrieb Matthias Fuchs: > > > + netdev->trans_start = jiffies; > > > + > > > + /* Slow down tx path */ > > > + if (atomic_read(&priv->active_tx_jobs) >= MAX_TX_URBS) > > > + netif_stop_queue(netdev); > > > > Where is the queue started again? > > > > Regards > > Oliver > > This is done in the ack-patch for sent messages: > > static void esd_usb2_tx_done_msg(struct esd_usb2_net_priv *priv, > struct esd_usb2_msg *msg) > { > ... > atomic_dec(&priv->active_tx_jobs); > > netif_wake_queue(netdev); > } Oh, I see. I am afraid this is a race. You have no guarantee that esd_usb2_tx_done_msg() runs after you stop the queue. If you do it that way you must stop the queue before you submit the URB due to which you want to stop it (and do the error handling) Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists