x86: fix RCU locking in PHYSDEVOP_get_free_pirq
authorJan Beulich <jbeulich@suse.com>
Wed, 5 Sep 2012 13:09:48 +0000 (15:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Sep 2012 13:09:48 +0000 (15:09 +0200)
commite3375c7ffb90a8f72c219109840b8b6e51a10a12
treedf96645cdbf8d2aeffaf5809dba588a76de46969
parent4f8b1ea9753add5fced5024c6bded2eb30c69916
x86: fix RCU locking in PHYSDEVOP_get_free_pirq

Apart from properly pairing locks with unlocks, also reduce the lock
scope - no need to do the copy_{from,to}_guest()-s inside the protected
region.

I actually wonder whether the RCU locks are needed here at all.

Reported-by: Tim Deegan <tim@xen.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/physdev.c