[lkml]   [2011]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 |

We end up with io enable bit cleared. Locking around rmw
that we have fixes this race.


 \ /
  Last update: 2011-08-09 14:03    [W:0.064 / U:0.308 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site