]> git.baikalelectronics.ru Git - kernel.git/commit
xenbus: fix deadlock on writes to /proc/xen/xenbus
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 9 Dec 2016 14:41:13 +0000 (14:41 +0000)
committerJuergen Gross <jgross@suse.com>
Mon, 12 Dec 2016 14:22:13 +0000 (15:22 +0100)
commit08c082c3dac5978fde8634b8564cb212e0f994ea
tree332071831cfcfdf54c1db18a874d0e687326d11a
parent4832a23187a3542a8cf3642be449590be3b9ae81
xenbus: fix deadlock on writes to /proc/xen/xenbus

/proc/xen/xenbus does not work correctly.  A read blocked waiting for
a xenstore message holds the mutex needed for atomic file position
updates.  This blocks any writes on the same file handle, which can
deadlock if the write is needed to unblock the read.

Clear FMODE_ATOMIC_POS when opening this device to always get
character device like sematics.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_dev_frontend.c