Messages in this thread | | | Date | Tue, 9 Aug 2011 15:02:07 +0300 | From | "Michael S. Tsirkin" <> | Subject | Re: [PATCH] uio/gen-pci: don't enable interrupts in ISR |
| |
On Tue, Aug 09, 2011 at 01:43:46PM +0200, Sebastian Andrzej Siewior wrote: > Michael S. Tsirkin wrote: > >>It seems to me that you could drop this "user block" thing > >>since you never change anything outside of this command register and it > >>does not stop the race. > > > >I don't think so: if we did, we would lose userspace modifications to > >other bits such as io enable, and there's no way to guess what their > >values should be. > > How so? > > Sebastian
Let's assume we start with e.g. io enable bit cleared.
user kernel read config | set io enable | | interrupt | read + set interrupt mask write config back | write
We end up with io enable bit cleared. Locking around rmw that we have fixes this race.
-- MST
| |