xenbus: do not hold transaction_mutex when returning to userspace
commit4c31a781144c1f556dfcda3277dafecd4e107d95
authorIan Campbell <ian.campbell@citrix.com>
Tue, 3 Nov 2009 15:58:40 +0000 (3 15:58 +0000)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tue, 3 Nov 2009 22:35:59 +0000 (3 14:35 -0800)
treecc2712f289e047b4cb782362bf3cef1415b04cb3
parent74fca6a42863ffacaf7ba6f1936a9f228950f657
xenbus: do not hold transaction_mutex when returning to userspace

================================================
  [ BUG: lock held when returning to user space! ]
  ------------------------------------------------
  xenstore-list/3522 is leaving the kernel with locks still held!
  1 lock held by xenstore-list/3522:
   #0:  (&xs_state.transaction_mutex){......}, at: [<c026dc6f>] xenbus_dev_request_and_reply+0x8f/0xa0

The canonical fix for this type of issue appears to be to maintain a
count manually rather than using an rwsem so do that here.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/xen/xenbus/xenbus_xs.c