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: <20070709.152746.75758774.davem@davemloft.net> Date: Mon, 09 Jul 2007 15:27:46 -0700 (PDT) From: David Miller <davem@...emloft.net> To: okir@....de Cc: netdev@...r.kernel.org Subject: Re: Races in net_rx_action vs netpoll? From: Olaf Kirch <okir@....de> Date: Wed, 4 Jul 2007 14:16:32 +0200 Another locking bug in netpoll, why am I not surprised? :-/ Thanks for reporting this Olaf. > I think the only real fix for this is to restrict who is allowed > to remove the interface from the poll_list. Only net_rx_action > should be allowed to do so. A possible patch is given below > (beware, it's untested so far) I'm happy to entertain this kind of solution, but we really need to first have an interface to change multiple bits at a time in one atomic operation, because by itself this patch doubles the number of atomices we do when starting a NAPI poll. > static inline int __netif_rx_schedule_prep(struct net_device *dev) > { > + /* The driver may have decided that there's no more work > + * to be done - but now another interrupt arrives, and > + * we changed our mind. */ > + smp_mb__before_clear_bit(); > + clear_bit(__LINK_STATE_RX_COMPLETE, &dev->state); > + > return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); > } > Because of that change. - 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