From: Toshiaki Makita <toshiaki.maki...@gmail.com> Date: Fri, 05 Jun 2015 00:34:50 +0900
> I'm thinking IRQ context does not match the prepare-commit model, and > Scott's fix is needed. There are more critical problems Scott's patch > fixes. > (I shortly explained it before, although it is not clearly stated in > the commitlog. http://marc.info/?l=linux-netdev&m=143219842420093&w=2) > > 1. Operations from IRQ context could change the state of rocker, like > hash tables. This could cause inconsistent states between > prepare-commit (for example, prepare phase cannot find an entry but > commit phase can find it), and leads to memory corruption (unreserved > memory could be used or reserved memory could not be used in commit > phase). If you hold the spinlock across the prepare and commit operation there is no problem. It is exactly what I am suggesting and fixes all the bugs. You add ->transaction_begin() and ->transaction_end() and these take the driver's spinlock or whatever synchronization object to protect the transaction. Then there is no conflict between software interrupt based operations and RTNL mutex held ones. I'm not going to explain my preference for how to fix this any further and will ignore any further submissions of a patch that tries to do this by pushing things to a workqueue, sorry. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html