]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 23 Jan 2017 07:14:06 +0000 (23:14 -0800)
commit33bcf48c7febdcf77a0abc551ca8c228ab00b22b
treeec67e8c82672d8437e94566008c746c2e3415ad7
parent7ed7c3551661e0f09cf6c476f30b2160232cc83d
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>
Orabug: 25425387
(cherry picked from commit 581d21a2d02a798ee34e56dbfa13f891b3a90c30)
Jira: OCC-36718
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/xen/xenbus/xenbus_dev_frontend.c